06.08.2013, 08:16
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CLASSELECT)
{
if(response) // If they clicked 'Yes' or pressed enter
{
//Class Selection
if(listitem == 0) //Soldier
{
gPlayerClass[playerid] = SOLDIER;
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 200);//m4
GivePlayerWeapon(playerid, 29, 250);//mp5
GivePlayerWeapon(playerid, 24, 70);//deagle
SendClientMessage(playerid, COLOR_WHITE, "You chose the Soldier as your class.");
}
if(GetPlayerScore(playerid) >=300)return SendClientMessage(playerid,COLOR_RED,"[SERVER]{FFFFFF}You need to be atleast Rank 2");
{
if(listitem == 1) //Sniper
{
gPlayerClass[playerid] = SNIPER;
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 250);//sniper
GivePlayerWeapon(playerid, 29, 250);//mp5
GivePlayerWeapon(playerid, 4, 1);//knife
GivePlayerWeapon(playerid, 23,70);//Silence Pistol
SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
SendClientMessage(playerid, COLOR_WHITE, "You Spawn with a Sniper Rifle at Spawn.");
SendClientMessage(playerid, COLOR_WHITE, "You are now invisible on the map.Happy Sniping!");
}
}
if(GetPlayerScore(playerid) >=300)return SendClientMessage(playerid,COLOR_RED,"[SERVER]{FFFFFF}You need to be atleast Rank 2");"
but this is not working and i can choose sniper class with 0 score