[Rookie Question] Getting the objectid per-say into a delete KeyStateChange?
#1

Hey there!

Yes yes I know... I feel stupid asking this question as I know it's simple i'm just having a mental blank right now.

pawn Код:
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
    if(type == SELECT_OBJECT_GLOBAL_OBJECT)
    {
        EditObject(playerid, objectid);
    }
    else
    {
        EditPlayerObject(playerid, objectid);
    }
    SendClientMessage(playerid, 0xFFFFFFFF, "You now are able to edit your object!");
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED( KEY_SUBMISSION|KEY_LOOK_BEHIND ))
    {
            SendClientMessage(playerid, 0xFFFFFFFF, "You deleted the object.");
        DestroyObject(objectid);
            CancelEdit(playerid);
       
    }
}
The error on 'DestroyObject(objectid);'
pawn Код:
undefined symbol "objectid"
Basically I want that when you select the object I am then able to delete it by pressing the key. However I can't remmeber how to get the objectid into either another string or get that string into the KeyStateChange.


Cheers.
Reply


Messages In This Thread
[Rookie Question] Getting the objectid per-say into a delete KeyStateChange? - by Deal-or-die - 08.04.2013, 06:35
Re: [Rookie Question] Getting the objectid per-say into a delete KeyStateChange? - by Deal-or-die - 08.04.2013, 07:37
Re: [Rookie Question] Getting the objectid per-say into a delete KeyStateChange? - by MP2 - 08.04.2013, 23:20

Forum Jump:


Users browsing this thread: 1 Guest(s)