Serching Red Flare objectid
#7

why would oyu need a zcmd?
just use the standard onplayercommand, save the objectid to an array and when deleting set that value to something like -1. when typing flare or sflare you just check if the flare objectid for that player is -1 and act acordingly (meaning that a player with no flare can't delete random objects with the id of his last flare and a player can't have 2 flares)

like this
Код:
// global
new PlayerFlareObject[MAX_PLAYERS];
// in on player command text
if (!strcmp(cmd,"/flare",true))
{
    if (PlayerFlareObject[playerid] == -1) // player haves no flare, create it
    {
        PlayerFlareObject[playerid] = CreateObject(bla);
    }
    else // player haves a flare, delete it
    {
        DestroyObject(PlayerFlareObject[playerid]);
        PlayerFlareObject[playerid] = -1;
    }
    return 1;
}
im sure you can change it to your likings
Reply


Messages In This Thread
[SOLVED] Serching Red Flare objectid - by Falco-Ger - 23.10.2011, 11:46
Re: Serching Red Flare objectid - by Rachael - 23.10.2011, 11:59
Re: Serching Red Flare objectid - by Falco-Ger - 23.10.2011, 12:15
Re: Serching Red Flare objectid - by Zonoya - 23.10.2011, 12:55
Re: Serching Red Flare objectid - by Falco-Ger - 25.10.2011, 17:22
Re: Serching Red Flare objectid - by DarkB0y - 14.02.2012, 16:46
Re: Serching Red Flare objectid - by Falco-Ger - 26.04.2012, 22:17
Re: Serching Red Flare objectid - by MP2 - 27.04.2012, 00:08
Re: Serching Red Flare objectid - by TheDominator - 27.04.2012, 02:29
Re: Serching Red Flare objectid - by RollTi - 27.04.2012, 02:32

Forum Jump:


Users browsing this thread: 3 Guest(s)