Vidie 5 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 Zdravím, nudil jsem se tak jsem udělal tento TUT... V1: Pokud nemáte Barvy tak si je nadefinujme: #define COLOR_BLUE 0x0000FFAA #define COLOR_RED 0xAA3333AA #define COLOR_WHITE 0xFFFFFFAA Vložte na začátek modu: new ridicak[MAX_PLAYERS]; new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; #define Check2 2 #define Check3 3 #define Check4 4 #define Check5 5 #define Check6 6 #define Check7 7 #define Check8 8 #define Check9 9 GameModeInit: pickup = CreatePickup(ID,1,SOuradnice X,Y,Z);//Zadej ID A souradnice kde se objevi pickup a s jakou ikonou (nej je 1581) tvemenu = CreateMenu("Ridicak", 1, 150.0, 100.0, 250.0, 150.0);// AddMenuItem(tvemenu, 0, "Udelat Test"); //Dejte sem co chcete treba koupit ridicak,udelat ridicak... AddMenuItem(tvemenu, 0, "Konec"); //tady dejte to co mu to menu skryje. OnPlayerSelctedMenuRow: if (Current == tvemenu ) { switch(row) { case 0:{ if(GetPlayerMoney(playerid) < 1999) {// nemá peníze SendClientMessage(playerid, COLOR_RED, "[ ! ] Nemáš peníze [ 2000,- ].");//posle zprávu že nemá prachy } else if (Ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!");//posle zprávu že již má řidičák }else{//když tyto podmínky splnuje GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!");//posle zprávu že dělá test SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0);//Nastaví checkpoint autoskola[playerid] = Check2;//a když do něj vejde, přejde na další } } } } OnPlayerEnterCheckpoint: switch(autoskola[playerid]) { case Check2: { DisablePlayerCheckpoint(playerid);//vypne predesli SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0);//sem zase novej checkpoint autoskola[playerid] = Check3;//Přepne na dalsi checkpoint //a zase dookola } case Check3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check4; } case Check4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check5; } case Check5: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check6; } case Check6: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check7; } case Check7: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check8; } case Check8: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check9; } case Check9: { DisablePlayerCheckpoint(playerid); ridicak[playerid] = 1;//da mu ridicak SendClientMessage(playerid,COLOR_WHITE,"[ ! ] Udělal sis řidičák!"); // posle zprávu že Dostal ridicak } } OnPlayerPickUPPickup: if(pickupid == pickup){ ShowMenuForPlayer(tvemenu,playerid);//Ukáže menu } Ukládání: Login: ridicak[playerid] = dUserINT(PlayerName(playerid)).("ridicak");//da ridičák pod loginu OnPlayerDisconnect: dUserSetINT(PlayerName(playerid)).("ridicak",ridicak[playerid]);//Uloží řidičák V2: - Když začnete test, vytvoří vám to auto a hodí vás do něj #define COLOR_BLUE 0x0000FFAA #define COLOR_RED 0xAA3333AA #define COLOR_WHITE 0xFFFFFFAA Vložte na začátek modu: new ridicak[MAX_PLAYERS]; new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; new autoskolacar; #define Check2 2 #define Check3 3 #define Check4 4 #define Check5 5 #define Check6 6 #define Check7 7 #define Check8 8 #define Check9 9 GameModeInit: pickup = CreatePickup(ID,1,SOuradnice X,Y,Z);//Zadej ID A souradnice kde se objevi pickup a s jakou ikonou (nej je 1581) tvemenu = CreateMenu("Ridicak", 1, 150.0, 100.0, 250.0, 150.0);// AddMenuItem(tvemenu, 0, "Udelat Test"); //Dejte sem co chcete treba koupit ridicak,udelat ridicak... AddMenuItem(tvemenu, 0, "Konec"); //tady dejte to co mu to menu skryje. OnPlayerSelctedMenuRow: if (Current == tvemenu ) { switch(row) { case 0:{ if(GetPlayerMoney(playerid) < 1999) {// nemá peníze SendClientMessage(playerid, COLOR_RED, "[ ! ] Nemáš peníze [ 2000,- ].");//posle zprávu že nemá prachy } else if (Ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!");//posle zprávu že již má řidičák }else{//když tyto podmínky splnuje GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!");//posle zprávu že dělá test SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0);//Nastaví checkpoint autoskolacar = CreateVehicle(ID Auta, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto PutPlayerInVehicle(playerid, autoskolacar,0); autoskola[playerid] = Check2;//a když do něj vejde, přejde na další } } } } OnPlayerEnterCheckpoint: switch(autoskola[playerid]) { case Check2: { DisablePlayerCheckpoint(playerid);//vypne predesli SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0);//sem zase novej checkpoint autoskola[playerid] = Check3;//Přepne na dalsi checkpoint //a zase dookola } case Check3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check4; } case Check4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check5; } case Check5: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check6; } case Check6: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check7; } case Check7: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check8; } case Check8: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check9; } case Check9: { DisablePlayerCheckpoint(playerid); ridicak[playerid] = 1;//da mu ridicak DestroyVehicle(autoskolacar); SendClientMessage(playerid,COLOR_WHITE,"[ ! ] Udělal sis řidičák!"); // posle zprávu že Dostal ridicak } } OnPlayerPickUPPickup: if(pickupid == pickup){ ShowMenuForPlayer(tvemenu,playerid);//Ukáže menu } Ukládání: Login: ridicak[playerid] = dUserINT(PlayerName(playerid)).("ridicak");//da ridičák pod loginu OnPlayerDisconnect: dUserSetINT(PlayerName(playerid)).("ridicak",ridicak[playerid]);//Uloží řidičák Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 if(pickupid == pickup){ ShowMenuForPlayer(tvemenu,playerid); } Máto byť takto :ináč je to good TuT if(pickupid == pickup) { ShowMenuForPlayer(tvemenu,playerid); } Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 if(pickupid == pickup){ShowMenuForPlayer(tvemenu,playerid); } Máto byť takto :ináč je to good TuT if(pickupid == pickup) { ShowMenuForPlayer(tvemenu,playerid); } to je upa jedno si to dam takto if(pickupid == pickup){...} a je to furt spravně.. btw dobrej tut ale mohl si to vic vysvetlit (nemyslim CP) Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 JN som to prehliadol dík Mach Link to comment Share on other sites More sharing options...
Vidie 5 Odesláno: 6. Prosinec, 2009 Author Share Odesláno: 6. Prosinec, 2009 taky děkuji sral sem se s tím asi 30 minut Link to comment Share on other sites More sharing options...
Adamos 1 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 Bl4ckJ0k3r":1c0m562m]Barvy: #define COLOR_BLUE 0x0000FFAA #define COLOR_RED 0xAA3333AA #define COLOR_WHITE 0xFFFFFFAA New: new Ridicak[MAX_PLAYERS] new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; GameModeInit: pickup = CreatePickup(ID,1,SOuradnice X,Y,Z);//Zadej ID A souradnice kde se objevi pickup a s jakou ikonou (nej je 1581) tvemenu = CreateMenu("Ridicak", 1, 150.0, 100.0, 250.0, 150.0);// AddMenuItem(tvemenu, 0, "Udelat Test");//taky to jmeno AddMenuItem(tvemenu, 0, "Konec");//taky OnPlayerSelctedMenuRow: if (Current == tvemenu ) { switch(row) { case 0:{ if(GetPlayerMoney(playerid) < 1999) {// nemá peníze SendClientMessage(playerid, COLOR_RED, "[ ! ] Nemáš peníze [ 2000,- ]."); } else if (Ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!"); }else{ GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!"); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check2; } } } } OnPlayerEnterCheckpoint: switch(autoskola[playerid]) { case Check2: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check3; } case Check3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check4; } case Check4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check5; } case Check5: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check6; } case Check6: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check7; } case Check7: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check8; } case Check8: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0); autoskola[playerid] = Check9; } case Check9: { DisablePlayerCheckpoint(playerid); ridicak[playerid] = 1; SendClientMessage(playerid,COLOR_WHITE,"[ ! ] Udělal sis řidičák!"); // Dostal ridicak } } OnPlayerPickUPPickup: if(pickupid == pickup){ ShowMenuForPlayer(tvemenu,playerid); } Ukládání: Login: ridicak[playerid] = dUserINT(PlayerName(playerid)).("ridicak"); OnPlayerDisconnect: dUserSetINT(PlayerName(playerid)).("povolani",povolani[playerid]); S Pozdravem Bl4ck J0k3r Hmm, do loginu ukladas ridicak a do disconnectu povolani? oprav si to Link to comment Share on other sites More sharing options...
Vidie 5 Odesláno: 6. Prosinec, 2009 Author Share Odesláno: 6. Prosinec, 2009 lol sry spletl sem se //EDIT: Opraveno Link to comment Share on other sites More sharing options...
Marwin37 5 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 nechcu ti nic říkat ale něco takového už tu je ode mě Link to comment Share on other sites More sharing options...
Guest WTF? Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 No skopírovane to neni.... No vidieť že si sa posnažil... PS: Dám si to do módu Link to comment Share on other sites More sharing options...
Vidie 5 Odesláno: 6. Prosinec, 2009 Author Share Odesláno: 6. Prosinec, 2009 No skopírovane to neni....No vidieť že si sa posnažil... PS: Dám si to do módu děkuji Link to comment Share on other sites More sharing options...
AvestX 5 Odesláno: 6. Prosinec, 2009 Share Odesláno: 6. Prosinec, 2009 Bl4ckJ0k3r":2xhr0luu]taky děkuji sral sem se s tím asi 30 minut hmm já 2 xD Link to comment Share on other sites More sharing options...
SweS 0 Odesláno: 8. Prosinec, 2009 Share Odesláno: 8. Prosinec, 2009 new ridicak[MAX_PLAYERS]; tam v newoch ti chyby ; Link to comment Share on other sites More sharing options...
domiiss 0 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 Potřebuju ktomu include ?? "affraid" Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 A naco? LoL nepotrebujes include Link to comment Share on other sites More sharing options...
domiiss 0 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 Mě píše erory -- sob 02. led 2010 19:19:42 -- undefined symbol ''Check2'' Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 Kam to davas? do pawna 0.2X? xD Link to comment Share on other sites More sharing options...
RmT_Kjuba 10 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 mozna na ukladani dudb ,dutils Link to comment Share on other sites More sharing options...
domiiss 0 Odesláno: 2. Leden, 2010 Share Odesláno: 2. Leden, 2010 Asi j nwm mám Devoleper Link to comment Share on other sites More sharing options...
djejsy 0 Odesláno: 24. Leden, 2010 Share Odesláno: 24. Leden, 2010 cawte prerobil som to na racecheckpoint ale nwm jak mam spravit ze ked hrac vojde do posledneho checkpointu teda teho finish-oveho tak aby zmizol... pls poradte... //Edit: O.K. uz som to spravil... Link to comment Share on other sites More sharing options...
Lukman 0 Odesláno: 24. Leden, 2010 Share Odesláno: 24. Leden, 2010 hází mi to error: error 017: undefined symbol "Current" na řádku: if (Current == tvemenu ) { Link to comment Share on other sites More sharing options...
Skemr 0 Odesláno: 3. Únor, 2010 Share Odesláno: 3. Únor, 2010 me taky to current a jeste: ERRORS: C:\Documents and Settings\Lukyn\Plocha\tm.pwn(120) : error 017: undefined symbol "Current" C:\Documents and Settings\Lukyn\Plocha\tm.pwn(126) : error 017: undefined symbol "Ridicak" C:\Documents and Settings\Lukyn\Plocha\tm.pwn(126) : warning 215: expression has no effect C:\Documents and Settings\Lukyn\Plocha\tm.pwn(126) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Lukyn\Plocha\tm.pwn(126) : error 029: invalid expression, assumed zero C:\Documents and Settings\Lukyn\Plocha\tm.pwn(126) : fatal error 107: too many error messages on one line 120: if (Current == ridicakmenu) { 126: else if (Ridicak[playerid] == 1); pls poradte nekdo....nevim co s tim... :-( Link to comment Share on other sites More sharing options...
AvestX 5 Odesláno: 3. Únor, 2010 Share Odesláno: 3. Únor, 2010 1: asi nemáš uzavřený závorky. 2: Proč dáváš za if středník ? napiš mi dyštak na skype avest1111111111 Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 3. Únor, 2010 Share Odesláno: 3. Únor, 2010 Nemaš nadefinovaná new Ridicak; na tie errory na riadku 126 Link to comment Share on other sites More sharing options...
AvestX 5 Odesláno: 3. Únor, 2010 Share Odesláno: 3. Únor, 2010 My to vyřešíme ... ale menu nemam moc rád Link to comment Share on other sites More sharing options...
Rayman 0 Odesláno: 3. Únor, 2010 Share Odesláno: 3. Únor, 2010 xD tak rieš dalej detectiv columbo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now