08.08.2012, 09:00
Use this stock I made:
Now this can be used under OnPlayerspawn to check whether a player is a cop or not, example:
pawn Код:
stock IsPlayerACop(playerid)
{
if(GetPlayerSkin(playerid) == 266 || 265 || 283 || 284 || 285)
return 1; // true
return 0; // false
}
pawn Код:
if(IsPlayerACop(playerid) == 0) // if the player is not a cop
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
}
if(IsPlayerACop(playerid) == 1) // the player is a cop
{
// Code
}