new SkinChosen[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(skinid == 0)
{
if(SkinChosen[playerid] == 1)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, Red, "ERROR : The Skin is already chosen!");
}
if(SkinChosen[playerid] == 0)
{
SkinChosen[playerid] = 1;
GivePlayerWeapon(playerid, 22, 180);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 32, 210);
GivePlayerWeapon(playerid, 30, 80);
switch(random(3))
{
case 0: SetPlayerPos(playerid, 2469, -1689, 15);
case 1: SetPlayerPos(playerid, 2469, -1689, 15);
case 2: SetPlayerPos(playerid, 2469, -1689, 15);
}
}
}
if(skinid == 165)
{
if(SkinChosen[playerid] == 1)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, Red, "ERROR : The Skin is already chosen!");
}
if(SkinChosen[playerid] == 0)
{
GivePlayerWeapon(playerid, 24, 50);
GivePlayerWeapon(playerid, 27, 50);
GivePlayerWeapon(playerid, 39, 180);
GivePlayerWeapon(playerid, 31, 80);
policeleader1[playerid] = 1;
SkinChosen[playerid] = 1;
switch(random(3))
{
case 0: SetPlayerPos(playerid, 1529, -1677, 6);
case 1: SetPlayerPos(playerid, 1529, -1677, 6);
case 2: SetPlayerPos(playerid, 1529, -1677, 6);
}
}
}
Originally Posted by Conroy
Don't use a variable array.
new SkinChosen[MAX_PLAYERS]; |
Originally Posted by Azzerking
Yes use
new skinchoosen Good Work Conroy |