GetObjectModel help
#4

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;
}
Reply


Messages In This Thread
GetObjectModel help - by N0FeaR - 31.03.2016, 14:01
Re: GetObjectModel help - by N0FeaR - 01.04.2016, 09:18
Re: GetObjectModel help - by Konstantinos - 01.04.2016, 09:37
Re: GetObjectModel help - by Antoniohl - 01.04.2016, 09:38
Re: GetObjectModel help - by N0FeaR - 01.04.2016, 10:08
Re: GetObjectModel help - by BroZeus - 01.04.2016, 10:15
Re: GetObjectModel help - by N0FeaR - 01.04.2016, 11:17
Re: GetObjectModel help - by jlalt - 01.04.2016, 11:26
Re: GetObjectModel help - by N0FeaR - 01.04.2016, 11:48

Forum Jump:


Users browsing this thread: 3 Guest(s)