03.01.2015, 12:27
What is the problem here ?
I tried it like that:
And like that
And both give me this
Please help !!
I tried it like that:
PHP код:
CMD:car(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_RED, "You can't use this command");
new carid, color1, color2;
new Float:x, Float:y, Float:z;
if(sscanf(params, "uii", carid, color1, color2)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /car [id] (Color 1) (Color 2)");
if(carid < 411 && carid > 611)
{
GetPlayerPos(playerid, x, y, z);
new car = CreateVehicle(carid, x, y, z, color1, color2, -1);
new interior = GetPlayerInterior(playerid);
LinkVehicleToInterior(car, interior);
new world = GetPlayerVirtualWorld(playerid);
SetVehicleVirtualWorld(car, world);
SendClientMessage(playerid, COLOR_BROWN, "Vehcile Spawned");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Car id can't be less than 411 or more than 611");
}
return 1;
}
PHP код:
CMD:car(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_RED, "You can't use this command");
new carid, color1, color2;
new Float:x, Float:y, Float:z;
if(sscanf(params, "uii", carid, color1, color2)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /car [id] (Color 1) (Color 2)");
if(carid < 411 || carid > 611) return SendClientMessag(playerid, COLOR_RED, "Car is can't be less than 411 or more than 611");
GetPlayerPos(playerid, x, y, z);
new car = CreateVehicle(carid, x, y, z, color1, color2, -1);
new interior = GetPlayerInterior(playerid);
LinkVehicleToInterior(car, interior);
new world = GetPlayerVirtualWorld(playerid);
SetVehicleVirtualWorld(car, world);
SendClientMessage(playerid, COLOR_BROWN, "Vehcile Spawned");
return 1;
}
Please help !!