21.10.2012, 13:34
Well, i made a /createplayerobject command but i have some problems; here is the code:
Is there any way to make the object in-frond of the player?
Код:
if(strcmp(cmd, "/cpo", true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); new tmp[128]; tmp = strtok(cmdtext, idx); if(strlen(tmp) == 0) return 1; CreatePlayerObject(playerid,strval(tmp),x,y+5,z,0,0,0); SetPVarInt(id,"dlpo",1); return 1; } if(strcmp(cmd, "/destlpo", true) == 0) { if(GetPVarInt(playerid,"dlpo") == 0) return 1; DestroyPlayerObject(playerid,lpo); GameTextForPlayer(playerid,"~y~Last player object destroyed!",3000,3); SendClientMessage(id,yellow,"Last player object deleted!"); SetPVarInt(id,"dlpo",0); return 1; }