08.04.2013, 06:35
(
Последний раз редактировалось Deal-or-die; 08.04.2013 в 07:37.
)
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.
The error on 'DestroyObject(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.
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);
}
}
pawn Код:
undefined symbol "objectid"
Cheers.