[Help] Plate + Attach to Vehicle
#1

well i hate this code (i took it from somewhere in the forum just to test)
but this is doesn't work :\
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/att", cmdtext, true))
    {
        new Float:xt,Float:yt,Float:zt;
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"NOT IN A CAR");
        GetVehiclePos(TC,xt,yt,zt);
        new TO = CreatePlayerObject(playerid,615, Float:xt, Float:yt, Float:zt+5, 0, 0, 0);
        AttachObjectToVehicle(TO,TC,xt,yt,zt,20,20,20);
        return 1;
    }
    if (!strcmp("/sp", cmdtext, true))
        {
            if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You're not in a vehicle!");
            new string[60];
            format(string,60,"Input your new vehicle numberplate below.",string);
            ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"{EE7777}Vehicle Numberplate",string,"Yes","Cancel");
            return 1;
        }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == 0) {
                if(response) {
                    SetVehicleNumberPlate(TC, inputtext);
                    SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                        } else {
                        SendClientMessage(playerid,0xFFFFFFFF,"You cancelled!");
                        }
                }
        return 1;
}
Reply


Messages In This Thread
[Help] Plate + Attach to Vehicle - by XePloiT - 28.11.2010, 19:33
Re: [Help] Plate + Attach to Vehicle - by Grim_ - 28.11.2010, 19:36
Re: [Help] Plate + Attach to Vehicle - by WillyP - 28.11.2010, 19:38
Re: [Help] Plate + Attach to Vehicle - by Grim_ - 28.11.2010, 19:41
Re: [Help] Plate + Attach to Vehicle - by WillyP - 28.11.2010, 19:42
Re: [Help] Plate + Attach to Vehicle - by XePloiT - 28.11.2010, 19:47
Re: [Help] Plate + Attach to Vehicle - by XePloiT - 28.11.2010, 22:25
Re: [Help] Plate + Attach to Vehicle - by XePloiT - 29.11.2010, 14:44
Re: [Help] Plate + Attach to Vehicle - by Vince - 29.11.2010, 16:05
Re: [Help] Plate + Attach to Vehicle - by XePloiT - 29.11.2010, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)