09.07.2012, 08:41
I've did a teleport, when you overtaking a certain point, behind you there is an explosion. But this don't work. What's wrong? Look my code
Wait your help
Important: On pawno there aren't any errors!
Код:
forward conto2(playerid); public conto2() { new Float:X, Float:Y, Float:Z; for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerInArea(i,-552,-553,1992,1991)) //-552 minx, -553 maxX, 1992 miny, 1991 maxy { GetPlayerPos(i,X, Y, Z); CreateExplosion(X, Y, Z, 12, 10.0); } } return 1; } stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) { return 1; } return 0; }
Important: On pawno there aren't any errors!