23.03.2011, 22:10
It still not working... Cmd here:
pawn Код:
COMMAND:spawncar(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 105)
{
new carid, carcolor1, carcolor2;
if(!sscanf(params, "iii", carid, carcolor1, carcolor2))
{
if(carid >= 400 && carid <= 611)
{
if(carcolor1 >= 0 && carid <= 252)
{
if(carcolor2 >= 0 && carid <= 252)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(carid, X, Y, Z+(2), 10, carcolor1, carcolor2, 100);
SendClientMessage(playerid, 0xFF00CC, "Vehicle Spawned");
return 1;
}
else return SendClientMessage(playerid, 0xFF00CC, "Only color id's between 0 and 252 are avaliable.");
}
else return SendClientMessage(playerid, 0xFF00CC, "Only color id's between 0 and 252 are avaliable.");
}
else return SendClientMessage(playerid, 0xFF00CC, "Only id's between 400 and 611 are avaliable.");
}
else return SendClientMessage(playerid, 0xFF00CC, "USAGE: /spawncar [VehicleId] [Color 1][Color 2]");
}
else return SendClientMessage(playerid, 0xFF00CC, "You are not allowed to use this command.");
}