05.08.2011, 16:45
Quote:
Quote: Originally Posted by Sergio_MOW Hm, ja sei qual erro, se ngm responder aqui posto dps e edito q agr vo pra aula flw kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk sу pra aumentar post kkkkk euri com essa desculpa #TOPIC Pronto, ajeitei o codigo: PHP Code: public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 2 ) { if(!response) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander\nAdmin", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); } if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = ASSAULT; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 31, 500); GivePlayerWeapon(playerid, 25, 100); SetPlayerSkin(playerid, 287); } else if(gTeam[playerid] == TEAM_GERMANY) { GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 31, 500); GivePlayerWeapon(playerid, 25, 100); SetPlayerSkin(playerid, 285); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } if(listitem == 1) { if( rank[playerid] >= 1 ) { SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = DEMOLITION; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { GivePlayerWeapon(playerid, 16, 50); GivePlayerWeapon(playerid, 36, 5); GivePlayerWeapon(playerid, 24, 200); SetPlayerSkin(playerid, 73); } else if(gTeam[playerid] == TEAM_GERMANY) { GivePlayerWeapon(playerid, 16, 50); GivePlayerWeapon(playerid, 36, 5); GivePlayerWeapon(playerid, 24, 200); SetPlayerSkin(playerid, 27); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } else { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !"); } } if(listitem == 2) { SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = SNIPER; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); SetPlayerSkin(playerid, 124); } else if(gTeam[playerid] == TEAM_GERMANY) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); SetPlayerSkin(playerid, 206); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } if(listitem == 3) { if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) { SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!"); TogglePlayerControllable(playerid, 1); return 1; } if(rank[playerid] >= 13) { SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = PILOT; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 163); GivePlayerWeapon(playerid, 22, 50); } if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 284); GivePlayerWeapon(playerid, 22, 50); } } else { SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); } } } if(listitem == 4) { SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = MEDIC; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 275); GivePlayerWeapon(playerid, 23, 200); GivePlayerWeapon(playerid, 1, 1); SetPlayerSkin(playerid, 275); } else if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 70); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 23, 200); SetPlayerSkin(playerid, 70); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } if(listitem == 5) { SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = ENGINEER; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 179); GivePlayerWeapon(playerid, 27, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 29, 200); } else if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 50); GivePlayerWeapon(playerid, 27, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 29, 200); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } if( listitem == 6 ) { //pyro if( rank[playerid] >= 4 ) { SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = PYRO; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 279); GivePlayerWeapon(playerid, 16, 20); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 23, 200); GivePlayerWeapon(playerid, 37, 550); } else if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 27; GivePlayerWeapon(playerid, 16, 20); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 23, 200); GivePlayerWeapon(playerid, 37, 250); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } else { SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); } } if( listitem == 7 ) { //scout if( rank[playerid] >= 1 ) { SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = SCOUT; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 12; SetPlayerArmour(playerid, 25); GivePlayerWeapon(playerid, 28, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 22, 200); } if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 202); SetPlayerArmour(playerid, 25); GivePlayerWeapon(playerid, 28, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 22, 200); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 24, 200); } } else { SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a scout!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); } } if(listitem == { if(rank[playerid] >= { SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = GENERAL; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 283); SetPlayerArmour(playerid, 95); GivePlayerWeapon(playerid, 31, 200); GivePlayerWeapon(playerid, 27, 200); GivePlayerWeapon(playerid, 28, 200); GeneralClass[playerid][1] = 1; } if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 28; SetPlayerArmour(playerid, 95); GivePlayerWeapon(playerid, 31, 200); GivePlayerWeapon(playerid, 27, 200); GivePlayerWeapon(playerid, 28, 200); GeneralClass[playerid][2] = 1; } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { GivePlayerWeapon(playerid, 31, 200); GivePlayerWeapon(playerid, 27, 200); GivePlayerWeapon(playerid, 28, 200); if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1; if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngine er\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel"); TogglePlayerControllable(playerid, 0); } } if( listitem == 9 ) { // admin NOTE: general is 8 if( adminlevel[playerid] > 0 ) { SendClientMessage(playerid, COLOR_GREY, "You chose the Admin as your class."); SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = ADMIN; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); SetPlayerColor(playerid, LIGHTGREEN); if(gTeam[playerid] == TEAM_USA) { SetPlayerSkin(playerid, 217); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 38, 20000); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 22, 20000); } if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerSkin(playerid, 217); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 38, 20000); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 22, 20000); } else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) { SetPlayerSkin(playerid, 217); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 38, 20000); GivePlayerWeapon(playerid, 1, 1); GivePlayerWeapon(playerid, 22, 20000); } } else SendClientMessage(playerid, COLOR_RED, "Bye bye - You aren't admin !"); } } return 1; } Depois disso, aperte CTRL + G e digite 2488 na caixa que irб aparecer na sua tela. Entгo na linha 2488, provavelmente, vocк irб encontrar GetPlayerName, entгo apague tudo que esteja entre a primeira chave ( { ) e ultima ( } ). |
Код:
C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2857) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2860) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2863) : error 021: symbol already defined: "GetPlayerName" C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2864) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2867) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2871) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2872) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : error 021: symbol already defined: "dini_IntSet" C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : warning 215: expression has no effect C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : warning 215: expression has no effect C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : warning 215: expression has no effect C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883) : error 010: invalid function or declaration C:\Documents and Settings\Tche\Desktop\Samp Server\gamemodes\guerras.pwn(2883 -- 2889) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Errors.
Код:
2857 if(dialogid == 60) 2860 if(response == 1) 2863 GetPlayerName(playerid, playername, sizeof(playername)); 2864 if(strlen(inputtext) == 0) 2867 return 1; 2871 pass = dini_Get(udb_encode(playername), "Password"); 2872 if( udb_hash(inputtext) == strval(pass) ) 2883 dini_IntSet(udb_encode(playername), "logged", 1);