26.08.2017, 13:17
Hey guys i made random weapons on every spawn with 3 cases.
Now its working good and I want to make a cmd(my gm is using ZCMD) /weap, so if i use it for the first time,it changes the set of weapons and if i use again the next set and again then the 3rd set and back to first ....like that.
Here is the code
Now its working good and I want to make a cmd(my gm is using ZCMD) /weap, so if i use it for the first time,it changes the set of weapons and if i use again the next set and again then the 3rd set and back to first ....like that.
Here is the code
Код:
public OnPlayerSpawn(playerid)
{
ResetPlayerWeapons(playerid);
switch(Spawn[playerid])
{
case 0: { GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 16, 4);
Spawn[playerid]++;
}
case 1: { GivePlayerWeapon(playerid, 27, 200);
GivePlayerWeapon(playerid, 28, 400);
GivePlayerWeapon(playerid, 30, 400);
GivePlayerWeapon(playerid, 16, 4);
Spawn[playerid]++;
}
case 2: { GivePlayerWeapon(playerid, 31, 400);
GivePlayerWeapon(playerid, 32, 400);
GivePlayerWeapon(playerid, 26, 200);
GivePlayerWeapon(playerid, 16, 4);
Spawn[playerid]=0; // The =0 MUST be at the LAST case.
}
}

