01.04.2016, 09:38
Change your cmd to this
Код:
CMD:attachobject(playerid, params[]) { new objectmodel, car; if(sscanf(params, "ii", objectmodel, car)) { SendServerMessage(playerid, "Use: /attachobject [object model] [SAMP Car ID]"); return 1; } if(!AttachAble(objectmodel)) return SendErrorMessage(playerid, "Invaild objectid use /attachableids"); if(0 < car < MAX_VEHICLES) { new Float:px, Float:py, Float:pz; GetPlayerPos(playerid, px, py, pz); AttachingObjects[playerid] = CreateObject(objectmodel, px, py, pz, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xfce80cFF, "Object created. Editing..."); EditObject(playerid, AttachingObjects[playerid]); SetPVarInt(playerid, "AttachingTo", car); } else { SendErrorMessage(playerid, "Invalid vehicle"); } return 1; }