08.04.2010, 11:51
pawn Код:
public HasPlayerLeft(playerid)
{
if(Jailed[playerid])
{
if(!IsPlayerInRangeOfPoint(playerid, 20, 197.35707092285, 173.41456604004, 1002.672668457))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
printf("Player %s tried to escape from jail, putting him/her back.", name);
new rand = random(2);
SetPlayerPos(playerid, RandomJail[rand][0], RandomJail[rand][1], RandomJail[rand][2]);
SetPlayerInterior(playerid, 3);
SendClientMessage(playerid, 0xFF3300FF, "You can't escape from jail!");
}
}
else if(Caged[playerid])
{
if(!IsPlayerInRangeOfPoint(playerid, 5, x[playerid], y[playerid], z[playerid])); //this line give me an empty statement error
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
printf("Player %s tried to escape from his/her cage, putting him/her back.", name);
SetPlayerPos(playerid, x[playerid], y[playerid], z[playerid]);
SendClientMessage(playerid, 0xFF3300FF, "You can't escape from your cage!");
}
}
}