22.08.2012, 15:23
if found the mistake
you need to use GetVehicleModel instead
pawn Код:
currentveh = GetPlayerVehicleID(playerid);
newveh = CreateVehicle(currentveh, X, Y, Z, A, 2, 0, -1);
/*
currentveh is 'vehicle ID' not 'MODEL ID'
*/
pawn Код:
CMD:plate(playerid, params[])
{
new currentveh, newveh, msg[128], Float:X, Float:Y, Float:Z, Float:A,vModel;
if(PlayerInfo[playerid][Padmin] >=1)
{
if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE: /plate <message>");
currentveh = GetPlayerVehicleID(playerid);
vModel = GetVehicleModel(currentveh);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
newveh = CreateVehicle(vModel, X, Y, Z, A, 2, 0, -1);
SetVehicleNumberPlate(newveh, msg);
DestroyVehicle(currentveh);
PutPlayerInVehicle(playerid,newveh,0);
return 1;
}
else if(PlayerInfo[playerid][Padmin] < 1)
{
SendClientMessage(playerid, COLOR_RED, "You must be admin to use this command");
return 1;
}
return 1;
}