if (APlayerData[playerid][PlayerScore] < 100) { // Let the player know he needs 100 scorepoints GameTextForPlayer(playerid, \"100 pontnak meg kell lenni a rendoros skinert\", 5000, 4); SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}100 pontnak meg kell lenni a rendoros skinert\"); return 0; // Don\'t allow the player to spawn as police player
public OnPlayerRequestClass(playerid,classid){ SetPlayerTeamFromClass(playerid, classid); RandomClass(playerid);switch (classid){ case 22,23,24: { GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4); }}return 1;}[/quote]Lekérdezné hogy van e több pontja 100nál akkor engedi INI_WriteInt(file, \"Score\",GetPlayerScore(playerid)); YSI Mentés
INI_WriteInt(file, \"Score\",GetPlayerScore(playerid));
hello a wikis link pont erre mutat példát http://wiki.sa-mp.com/wiki/OnPlayerRequestClasspróbáld meg ez alapján és majd írd hogy sikerült
public OnPlayerRequestClass(playerid,classid){ SetPlayerTeamFromClass(playerid, classid); RandomClass(playerid);switch (classid){case 0,1,2,3: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid,\"~g~Kamionos Munka\",8000,4);}case 4,5,6,7,8,9: // Classes that will be Boat-drivers{ // Display the name of the class GameTextForPlayer(playerid,\"~y~Buszos Munka\",8000,4);}case 10,11,12,13:{ GameTextForPlayer(playerid, \"~r~Taxis Munka\", 8000, 4);}case 14,15,16,17,18:{ GameTextForPlayer(playerid, \"~p~Pilota\", 8000, 4);}case 19,20,21:{ GameTextForPlayer(playerid, \"~b~Szallito\", 8000, 4);}case 22:{ if(IsPlayerAdmin(playerid)) GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4);}if(classid == 22 && !IsPlayerAdmin(playerid)) { SendClientMessage(playerid,COLOR_GREEN,\"This skin is only for admins!\"); return 0;}return 1;}
public OnPlayerRequestClass(playerid,classid){ SetPlayerTeamFromClass(playerid, classid); RandomClass(playerid);switch (classid){case 0,1,2,3: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid,\"~g~Kamionos Munka\",8000,4);}case 4,5,6,7,8,9: // Classes that will be Boat-drivers{ // Display the name of the class GameTextForPlayer(playerid,\"~y~Buszos Munka\",8000,4);}case 10,11,12,13:{ GameTextForPlayer(playerid, \"~r~Taxis Munka\", 8000, 4);}case 14,15,16,17,18:{ GameTextForPlayer(playerid, \"~p~Pilota\", 8000, 4);}case 19,20,21:{ GameTextForPlayer(playerid, \"~b~Szallito\", 8000, 4);}if(classid == 22 && !IsPlayerAdmin(playerid)) { GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4); SendClientMessage(playerid,COLOR_GREEN,\"This skin is only for admins!\"); return 0; }}return 1;}
Aha akkor adminnal oldaom meg
if(GetPlayerScore(playerid) < 100) { return 0; }
Aha akkor adminnal oldaom meg nem erre gondoltam azt hittem kicsit jobban vágod a dolgokat de akkor kicsit többet segítek http://wiki.sa-mp.com/wiki/GetPlayerScore if(GetPlayerScore(playerid) < 100) { return 0; } na remélem ez alapján már menni fog [/quote]Igazábol én ezt érteném csak ez a case dolog bezav ar engem :wall: public OnPlayerRequestClass(playerid,classid){ SetPlayerTeamFromClass(playerid, classid); RandomClass(playerid);switch (classid){case 0,1,2,3: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid,\"~g~Kamionos Munka\",8000,4);}case 4,5,6,7,8,9: // Classes that will be Boat-drivers{ // Display the name of the class GameTextForPlayer(playerid,\"~y~Buszos Munka\",8000,4);}case 10,11,12,13:{ GameTextForPlayer(playerid, \"~r~Taxis Munka\", 8000, 4);}case 14,15,16,17,18:{ GameTextForPlayer(playerid, \"~p~Pilota\", 8000, 4);}case 19,20,21:{ GameTextForPlayer(playerid, \"~p~Szallito\", 8000, 4);}case 22:{ GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4); if(GetPlayerScore(playerid) < 100) { return 0; } }}return 1;} így?
public OnPlayerRequestClass(playerid,classid){ SetPlayerTeamFromClass(playerid, classid); RandomClass(playerid);switch (classid){case 0,1,2,3: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid,\"~g~Kamionos Munka\",8000,4);}case 4,5,6,7,8,9: // Classes that will be Boat-drivers{ // Display the name of the class GameTextForPlayer(playerid,\"~y~Buszos Munka\",8000,4);}case 10,11,12,13:{ GameTextForPlayer(playerid, \"~r~Taxis Munka\", 8000, 4);}case 14,15,16,17,18:{ GameTextForPlayer(playerid, \"~p~Pilota\", 8000, 4);}case 19,20,21:{ GameTextForPlayer(playerid, \"~p~Szallito\", 8000, 4);}case 22:{ GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4); if(GetPlayerScore(playerid) < 100) { return 0; } }}return 1;}
case 22:{ GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4);if(GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,COLOR_RED,\"100 pont szükséges ehhez a munkához !\"); return 0; }}
case 0,1,2,3: // Classes that will be truckdrivers{ // Display the name of the class GameTextForPlayer(playerid,\"~g~Kamionos Munka\",8000,4);}case 4,5,6,7,8,9: // Classes that will be Boat-drivers{ // Display the name of the class GameTextForPlayer(playerid,\"~y~Buszos Munka\",8000,4);}case 10,11,12,13:{ GameTextForPlayer(playerid, \"~r~Taxis Munka\", 8000, 4);}case 14,15,16,17,18:{ GameTextForPlayer(playerid, \"~p~Pilota\", 8000, 4);}case 19,20,21:{ GameTextForPlayer(playerid, \"~p~Szallito\", 8000, 4);} case 22:{ GameTextForPlayer(playerid, \"~b~Rendvedelem\", 8000, 4); if(GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,COLOR_RED,\"100 pont szükséges ehhez a munkához !\"); return 0; }}}