/findgiftbox
#2

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;
}
Greekz
Reply


Messages In This Thread
/findgiftbox - by Trevor Gin - 11.03.2015, 14:35
AW: /findgiftbox - by Kaliber - 11.03.2015, 14:44
Re: AW: /findgiftbox - by ATGOggy - 11.03.2015, 14:47
AW: Re: AW: /findgiftbox - by Kaliber - 11.03.2015, 14:52
Re: /findgiftbox - by Trevor Gin - 11.03.2015, 15:13
AW: /findgiftbox - by Kaliber - 11.03.2015, 15:14
Re: /findgiftbox - by Trevor Gin - 11.03.2015, 15:26
AW: Re: /findgiftbox - by Kaliber - 11.03.2015, 15:28
Re: AW: Re: /findgiftbox - by Trevor Gin - 11.03.2015, 16:11

Forum Jump:


Users browsing this thread: 6 Guest(s)