24.02.2017, 07:06
You can do it like this :
PHP код:
if(running !=1 && IsPlayerInRangeOfPoint(playerid,10.0,beds[i][0],beds[i][1],beds[i][2]) && health > 0 && !IsPlayerInAnyVehicle(playerid)) // In this script we deal with players only
{
//insert the below two line in your code :
if((i == 0 && gPlayerTeamSelection[playerid] == TEAM_VIOLET) || (i == 1 && gPlayerTeamSelection[playerid] == TEAM_BROWN) || (i == 2 && gPlayerTeamSelection[playerid] == TEAM_YELLOW))
return SendClientMessage(playerid, -1, "You cannot blow your own team bed!");