04.10.2009, 11:31
Is there a way to check if player is at 24-7?
Like IsPlayerAt247 or something...
Like IsPlayerAt247 or something...
PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
if (strcmp("/test", cmdtext, true) == 0)
{
if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))
{
SendClientMessage(playerid, COLOR, "You are in a 24-7!");
}
else
{
SendClientMessage(playerd, COLOR, "You are not in a 24-7!");
}
return 1;
}