07.11.2013, 14:04
Код:
C:\Users\Antonio\Desktop\SA-MP Server\gamemodes\gmbeta.pwn(1887) : error 014: invalid statement; not in switch C:\Users\Antonio\Desktop\SA-MP Server\gamemodes\gmbeta.pwn(1887) : warning 215: expression has no effect C:\Users\Antonio\Desktop\SA-MP Server\gamemodes\gmbeta.pwn(1887) : error 001: expected token: ";", but found ":" C:\Users\Antonio\Desktop\SA-MP Server\gamemodes\gmbeta.pwn(1887) : error 029: invalid expression, assumed zero C:\Users\Antonio\Desktop\SA-MP Server\gamemodes\gmbeta.pwn(1887) : fatal error 107: too many error messages on one line
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_GREY"REGISTER",""COL_WHITE"Dobro dosao na server.\nVas profil nije pronaden.\nKako bi igrali morate se registrirati\nUnesite zeljenu lozinku da se registrirate.","Register","Izadi"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"VIP",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Banned",0); INI_WriteInt(File,"Scores",0); GivePlayerCash(playerid, 100); PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][pVIP] = 0; INI_Close(File); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_GREY"REGISTER",""COL_WHITE"Uspjesno ste se registrirali!\nNa serveru postoje pravila koja se moraju postivati.\nDa vidite listu pravila kucajte /rules\nAko vam treba pomoc kucajte /help.\n Pritisnite spawn da se spawnate.","Ok",""); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerCash(playerid, PlayerInfo[playerid][pCash]); SetPlayerScore(playerid,PlayerInfo[playerid][pScores]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_GREY"LOGIN",""COL_GREEN"Uspjesno ste se ulogirali!\n"COL_RED"OBAVIJESTI: "COL_WHITE"Server je trenutno u radnji!\n"COL_RED"0.3 VERZIJA:"COL_WHITE"SLozeno dosta bugova i ubaceno novih stvari.\nPritisni spawn da se spawnas","Ok",""); SpawnPlayer(playerid); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_GREY"LOGIN",""COL_WHITE"Dobro dosao na server.\nVas profil je pronaden.\nUnesite vasu lozinku da se logirate.","Login","Izadi"); } return 1; } } } case DIALOG_CLASS: { if(dialogid == 6) { if(response) { if(GetPlayerScore(playerid) <= 0)//Private { SetPlayerSkin(playerid, 287); SendClientMessage(playerid, COLOR_WHITE, "You chose the assault as your class."); SendClientMessage(playerid, COLOR_WHITE, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = ASSAULT_CLASS; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 31, 500); GivePlayerWeapon(playerid, 17, 5); } } if(listitem == 1)//sniper DONE { if(GetPlayerScore(playerid) <= 10)//Private { SetPlayerSkin(playerid, 122); SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class."); SendClientMessage(playerid, COLOR_WHITE, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = SNIPER_CLASS; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); GivePlayerWeapon(playerid, 23, 500); GivePlayerWeapon(playerid, 34, 100); GivePlayerWeapon(playerid, 29, 200); } else { SendClientMessage(playerid, COLOR_WHITE, "You need to be atleast Private class [/rank to see yours]"); TogglePlayerControllable(playerid, 0); } } if(listitem == 2)//pilot DONE { if(GetPlayerScore(playerid) <= 1150)//Lieutenant Colonel { SetPlayerSkin(playerid, 61); SendClientMessage(playerid, COLOR_WHITE, "You chose the Pilot as your class."); SendClientMessage(playerid, COLOR_WHITE, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = AIRMAN_CLASS; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); GivePlayerWeapon(playerid, 22, 50); GivePlayerWeapon(playerid, 29, 500); GivePlayerWeapon(playerid, 16, 5); } else { SendClientMessage(playerid, COLOR_WHITE, "You need to be atleast Lieutenant Colonel class [/rank to see yours]"); TogglePlayerControllable(playerid, 0); } } if(listitem == 3)//Engineer { if(GetPlayerScore(playerid) <= 250)//Sergeant { SetPlayerSkin(playerid, 285); SendClientMessage(playerid, COLOR_WHITE, "You chose the Engineer as your class."); SendClientMessage(playerid, COLOR_WHITE, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = ENGINEER_CLASS; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); GivePlayerWeapon(playerid, 22, 100); GivePlayerWeapon(playerid, 32, 500); GivePlayerWeapon(playerid, 35, 5); } else { SendClientMessage(playerid, COLOR_WHITE, "You need to be atleast Sergeant class [/rank to see yours]"); TogglePlayerControllable(playerid, 0); } } if(listitem == 4)//FlameThrower { if(GetPlayerScore(playerid) <= 400)//CAPTAIN { SetPlayerSkin(playerid, 144); SendClientMessage(playerid, COLOR_WHITE, "You chose the Flamethrower as your class."); SendClientMessage(playerid, COLOR_WHITE, "You can type /switchclass to change your class again."); gPlayerClass[playerid] = FLAMETHROWER_CLASS; PickedClass[playerid] = 1; SetPlayerVirtualWorld(playerid, 0); TogglePlayerControllable(playerid, 1); GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 30, 200); GivePlayerWeapon(playerid, 37, 200); } else { SendClientMessage(playerid, COLOR_WHITE, "You need to be atleast Captain class [/rank to see yours]"); TogglePlayerControllable(playerid, 0); } } return 1; } } } return 1; }