SA-MP Forums Archive
Code not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Code not working (/showthread.php?tid=645003)



Code not working - Jokers98s - 18.11.2017

Am trying make an cod gm. The class selection now working properly can select class but weapons and all all other wont working. Please anyone help


Re: Code not working - billy1337samp - 18.11.2017

wheres the code


Re: Code not working - Jokers98s - 18.11.2017

Quote:

if(FirstSpawn[playerid] == 1)
{
new string[5060];
SendClientMessage(playerid,red,"Please select your class");
FirstSpawn[playerid] = 0;
AntiSK[playerid] = 0;
strcat(string, "{FFFFFF}Class\t{FFFFFF}Rank\t{FFFFFF}Status\n ");
strcat(string, "{EC7600}Assault\t{FFFFFF}[0]\t{00DF00}Unlocked\n");
if(GetPlayerScore(playerid) > 200)
{
strcat(string, "{EC7600}Sniper\t{FFFFFF}[4]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Sniper\t{FFFFFF}[4]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 650)
{
strcat(string, "{EC7600}Medic\t{FFFFFF}[3]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Medic\t{FFFFFF}[3]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 1900)
{
strcat(string, "{EC7600}Pilot\t{FFFFFF}[6]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Pilot\t{FFFFFF}[6]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 1500)
{
strcat(string, "{EC7600}Engineer\t{FFFFFF}[5]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Engineer\t{FFFFFF}[5]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 2500)
{
strcat(string, "{EC7600}JetTrooper\t{FFFFFF}[7]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}JetTrooper\t{FFFFFF}[7]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 1000)
{
strcat(string, "{EC7600}Scout\t{FFFFFF}[5]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Scout\t{FFFFFF}[5]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 5000)
{
strcat(string, "{EC7600}Spy\t{FFFFFF}[5]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Spy\t{FFFFFF}[5]\t{FF0000}Locked\n");
}
if(GetPlayerScore(playerid) > 10000)
{
strcat(string, "{EC7600}Minister\t{FFFFFF}[10]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Minister\t{FFFFFF}[10]\t{FF0000}Locked\n");
}
if(PlayerInfo[playerid][dRank] >= 1)
{
strcat(string, "{EC7600}Donor\t{FFFFFF}[18]\t{00DF00}Unlocked\n");
}
else
{
strcat(string, "{EC7600}Donor\t{FFFFFF}[18]\t{FF0000}Locked\n");
}
ShowPlayerDialog(playerid,CLASS_DIALOG,DIALOG_STYL E_TABLIST_HEADERS,"Select your class:",string,"Select","Back");
}

this is the class selection code after it anti-spawn protection timer wont stop nor weapons given to the player