/changeplate.
#3

Quote:
Originally Posted by KingTurtle
Посмотреть сообщение
Try this, not sure if it works

pawn Код:
CMD:changeplate(playerid, params[])
{
    new platenumber[124];
    if(sscanf(params, "i[24]", platenumber)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /changeplate [platenumber]");
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle.");

    if(!dini_Exists("CarPlates.ini")) {
        dini_Create("CarPlates.ini");
    }
    new Str[128];
    new vehid = GetPlayerVehicleID(playerid);
    format(Str,128,"%d",vehid);
    dini_Set("CarPlates.ini", Str, platenumber);
    platenumber = strval(params);
    SetVehicleNumberPlate(GetPlayerVehicleID(playerid),platenumber);
    SetVehicleToRespawn(vehid);
    SendClientMessage(playerid, 0xFF9900AA, "License plate changed!");
    new Float:x, Float:y, Float:z, Float:a;
    GetVehicleZAngle(vehid,a);
    GetPlayerPos(playerid,x,y,z);
    SetVehiclePos(vehid,x,y,z);
    SetVehicleZAngle(vehid,a);
    PutPlayerInVehicle(playerid, vehid, 0);
    return 1;
}
Quote:

error 033: array must be indexed (variable "platenumber")

Uhmmm...
Reply


Messages In This Thread
/changeplate. - by Darnell - 14.08.2011, 09:49
Re: /changeplate. - by KingTurtle - 14.08.2011, 10:49
Re: /changeplate. - by Darnell - 14.08.2011, 11:10
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 05:50
Re: /changeplate. - by Darnell - 15.08.2011, 06:00
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:14
Re: /changeplate. - by Darnell - 15.08.2011, 06:17
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:29
Re: /changeplate. - by Darnell - 15.08.2011, 06:34
Re: /changeplate. - by Killa[DGZ] - 15.08.2011, 06:53

Forum Jump:


Users browsing this thread: 4 Guest(s)