11.03.2015, 14:47
Quote:
Take only the Array & enum from this: http://pastebin.com/f68e1a6ad
And then write the command like this: Код:
CMD:findgiftbox(playerid, params[]) { if(CheckPointCheck(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint)."); if(!dynamicgift) return SendClientMessageEx(playerid, COLOR_BLUE, "Giftbox not placed yet"); new Float:Position[3],string[64]; GetDynamicObjectPos(dynamicgift, Position[0], Position[1], Position[2]); for(new i = 0; i != sizeof(gSAZones); i++ ) { if(Position[0] >= gSAZones[i][SAZONE_AREA][0] && Position[0] <= gSAZones[i][SAZONE_AREA][3] && Position[1] >= gSAZones[i][SAZONE_AREA][1] && Position[1] <= gSAZones[i][SAZONE_AREA][4]) { format(string, 64, gSAZones[i][SAZONE_NAME], 0); break; } } format(string,sizeof string," The giftbox is placed at %s",string); SendClientMessage(playerid, COLOR_BLUE, string); SetPlayerCheckpoint(playerid, Position[0], Position[1], Position[2], 5.0); return 1; } |