20.07.2012, 07:09
Код:
CMD:activatetrucker(playerid, params[]) { if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: You are not authorized to use this command."); new Float:X, Float:Y, Float:Z; //We use this to store player position GetPlayerPos(playerid, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously if (X >= -466 && X <= -505 && Y >= -468 && Y <= -507) { SendClientMessage(playerid, COLOR_YELLOW, "Success!"); } else { SendClientMessage(playerid, COLOR_RED, "Failed!"); } return 1; }
Also, How do I post my code in pawno here on the forum. Thanks heaps guys!