08.02.2019, 10:29
Hi guyz can someone Tutor me here i`m slow Learner
and I want to give Weapon depend on class
thank you for who help
and I want to give Weapon depend on class
thank you for who help
new Variable[MAX_PLAYERS]; // this should be your class public OnPlayerSpawn(playerid) { if(Variable[playerid] == 1) // if this is true it is gonna to do the following { GivePlayerWeapon(playerid,24,50) // this gives weapon, 24 is id of desert eagle, 50 is ammo which is goona be given to that player } else if(Variable[playerid] == 2) // and now the same thing but this time if Variable is set to 2 and you should put another weapon here { GivePlayerWeapon(playerid, 25, 50) } return 1; }
That class should be a variable for player?
You can do it like this Код:
new Variable[MAX_PLAYERS]; // this should be your class public OnPlayerSpawn(playerid) { if(Variable[playerid] == 1) // if this is true it is gonna to do the following { GivePlayerWeapon(playerid,24,50) // this gives weapon, 24 is id of desert eagle, 50 is ammo which is goona be given to that player } else if(Variable[playerid] == 2) // and now the same thing but this time if Variable is set to 2 and you should put another weapon here { GivePlayerWeapon(playerid, 25, 50) } return 1; } |
else if(HITMAN[playerid] == 2)