Attach obj
#1

I have this command but i cant edit it,

pawn Код:
CMD:atchobj(playerid, params[])
{
    new objectid, vehid;
    if(sscanf(params, "di", objectid, vehid)) return SendClientMessage(playerid, COLOR_RED, "usage: /attachobject (obj edit id) (veh ID)");
    if(PlayerObjectCount[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Invalid Object Editing ID.");
    if(!IsValidDynamicObject(PlayerObject[playerid][objectid]) || objectid < 1) return SendClientMessage(playerid, COLOR_RED, "Invalid Object Editing ID.");
    if(!IsValidVehicle(vehid)) return SendClientMessage(playerid, COLOR_RED, "This Vehicle Doesn't Exist In The Server.");
    if(IsPlayerEditingObject[playerid] == 1) CancelEdit(playerid);
    else IsPlayerEditingObject[playerid] = 1;
    new Float:x, Float:y, Float:z;
    AttachDynamicObjectToVehicle(PlayerObject[playerid][objectid], vehid, x, y, z, 0.0, 0.0, 0.0);
    return 1;
}
edit cmd

pawn Код:
CMD:editatchobj(playerid, params[])
{
    new objectid, vehid;
    if(sscanf(params, "di", objectid, vehid)) return SendClientMessage(playerid, COLOR_RED, "usage: /editattachedobject (Object Editing ID) (Vehicle ID)");
    if(PlayerObjectCount[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Invalid Object Editing ID.");
    if(!IsValidDynamicObject(PlayerObject[playerid][objectid]) || objectid < 1) return SendClientMessage(playerid, COLOR_RED, "Invalid Object Editing ID.");
    if(!IsValidVehicle(vehid)) return SendClientMessage(playerid, COLOR_RED, "This Vehicle Doesn't Exist In The Server.");
    if(IsPlayerEditingObject[playerid] == 1) CancelEdit(playerid);
    else IsPlayerEditingObject[playerid] = 1;
    EditAttachedObject(vehid, PlayerObject[playerid][objectid]);
    return 1;
}
Reply


Messages In This Thread
Attach obj - by Ananisiki - 09.05.2014, 05:20
Re: Attach obj - by mrtms - 09.05.2014, 05:25
Re: Attach obj - by Ananisiki - 09.05.2014, 18:53
Re: Attach obj - by Ananisiki - 10.05.2014, 00:31

Forum Jump:


Users browsing this thread: 1 Guest(s)