25.08.2012, 18:38
(
Последний раз редактировалось Biess; 25.08.2012 в 20:12.
)
Alright i have this code.
And i made it so you need 500 score else it rejects you from the class, and i have a class system dialoge.
But now when i enter the pilot class the dialog disapears and i have no class. i want it to say something like
You need to have 500 score to acsess the Pilot class! and bring him back to the dialoge.
But now it just gives him 0 weapons and spawns it with no class
And i made it so you need 500 score else it rejects you from the class, and i have a class system dialoge.
But now when i enter the pilot class the dialog disapears and i have no class. i want it to say something like
You need to have 500 score to acsess the Pilot class! and bring him back to the dialoge.
But now it just gives him 0 weapons and spawns it with no class
pawn Код:
if(listitem == 4)
{
if(GetPlayerScore(playerid) >= 500)
{
SendClientMessage(playerid, COLOR_WHITE, "You chose the Pilot as your class.");
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun", "Play","");
gPlayerClass[playerid] = PILOT;
PickedClass[playerid] = 1;
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 200);//deagle
GivePlayerWeapon(playerid, 17, 4);//moltove
GivePlayerWeapon(playerid, 25, 100);//shotgun
}
}
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Soldier Class\nSniper Class\nEngineer Class\nJet-Trooper Class\nPilot Class\nSpy Class", "Choose","");
return 1;
}