19.03.2015, 17:00
Код:
CMD:placemine(playerid,params[]) { new Float:MineX,Float:MineY,Float:MineZ; if(MinePlaced[playerid] == 1) return SendClientMessage(playerid,COLOR_INDIANRED,"You have already place a mine somewhere."); GetPlayerPos(playerid,MineX,MineY,MineZ); MineObject = CreateObject(1252,MineX,MineY,MineZ-1,0.0, 0.0, 96.0); for(new i = 0; i < MAX_PLAYERS; i++) MineLabel[i] = CreatePlayer3DTextLabel(i,"MINE HERE",COLOR_INDIANRED, MineX, MineY, MineZ,20.0); MinePos[playerid][0] = MineX; MinePos[playerid][1] = MineY; MinePos[playerid][2] = MineZ; SendClientMessage(playerid,COLOR_PURPLE,"You have placed a mine."); MineTimerUpdate[playerid] = SetTimerEx("MineTimer", 1000, true, "i", playerid); MinePlaced[playerid] = 1; return 1; }