22.03.2011, 17:47
Well, heres my command with it in.
PHP код:
CMD:v(playerid, params[])
{
new color1,color2;
new CarName;
new string[50];
CarName = GetVehicleModelIDFromName(params);
if (sscanf(params,"i",CarName))
{
return SendClientMessage(playerid, -1, "Syntax: /v <vehicle ID>, color1, color2");
}
if ( getveh[playerid] > 0 )
{
DestroyVehicle(getveh[playerid]);
getveh[playerid] = 0;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
getveh[playerid] = CreateVehicle(CarName, x, y, z, 90, color1, color2, false);
PutPlayerInVehicle(playerid, getveh[playerid], 0);
}else{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
getveh[playerid] = CreateVehicle(CarName, x, y, z, 90, color1, color2, false);
PutPlayerInVehicle(playerid, getveh[playerid], 0);
}
return 1;
}
doesnt work. D: