05.08.2013, 19:20
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) >=750)return SendClientMessage(playerid,COLOR_RED,"[SERVER]{FFFFFF}You need to be atleast Rank 3");
{
if i choose sniper i can still choose it with 0 score why
i added 300 score requirement not working
{
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) >=750)return SendClientMessage(playerid,COLOR_RED,"[SERVER]{FFFFFF}You need to be atleast Rank 3");
{
if i choose sniper i can still choose it with 0 score why
i added 300 score requirement not working