Quote:
Originally Posted by Larceny
Con las coordinates X,Y,Z utiliza-se PlayerToPoint.
pawn Код:
// Arriba del gm. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); forward Check();
// En OnGameModeInit SetTimer("Check",1000,1);
//Donde sea. public 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; }
// Donde sea. public Check() { if(PlayerToPoint(20.0,playerid,-793.9444,489.5581,1376.1953) { ResetPlayerWeapons(playerid); SendClientMessage(playerid, 0xA9C4E4FF, "Tus armas fueron eliminadas automбticamente al entrar en en бrea."); } return 1; }
Gracias a Cristian.
|
Hicqe eso, y me tira error en playerid