15.12.2014, 16:33
This is the CreateObject code :
And the DestroyObject code:
The CreateObject command works but the DestroyObject one doesn't work.
Please Help !!
PHP код:
CMD:cbarrier(playerid,params[])
{
new Float:x, Float:y, Float:z;
new Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateObject(1422, x+5,y,z,0,0,a); // change the object id
SendClientMessage(playerid, -1, "You have spawned a barrier.");
return 1;
}
PHP код:
CMD:rbarrier(playerid,params[])
{
DestroyObject(1422); // change the object id
SendClientMessage(playerid, -1, "You have removed a barrier");
return 1;
}
Please Help !!