Unworking /v command.
#2

Try this: I think the mistake you done is using wrong parameters of player.
pawn Код:
CMD:v(playerid, params[])
{
 if(PlayerInfo[playerid][pAdmin] <= 1) return SendClientMessage(playerid, -1, "You are not authorized to use this command.");
new vehid;new b1;new b2;new targetid;
 if(sscanf(params, "uiii", targetid,vehid,b1,b2)) SendClientMessage(playerid, -1, "Use: /v [id] [car id] [color 1] [color 2]");
 if(vehid < 400 || vehid > 611) return SendClientMessage(playerid, -1, "Wrong car id! ( 400-600)");
 if(vehid == 425 || vehid == 520 || vehid == 537 || vehid == 538 || vehid == 569 || vehid == 570 || vehid == 590) return SendClientMessage(playerid, -1, "You can't spawn a hydra and the rest military vehicles!");
 if(b2 <=0 || b2 >= 252) return SendClientMessage(playerid, -1, "Wrong color 1 id!");
 if(b1 <=0 || b1 >= 252) return SendClientMessage(playerid, -1, "Wrong color 2 id!");
 new Lname[MAX_PLAYER_NAME];
 GetPlayerName(playerid, Lname, sizeof(Lname));
 new Float:x, Float:y, Float:z;
 new Float:kut;
 GetPlayerPos(playerid, x, y, z);
 GetPlayerFacingAngle(playerid, kut);
 CreateVehicle(vehid, x + 3, y + 1, z, kut, b1, b2, -1);
 SendClientMessage(playerid, -1, "You have spawned a car near you!");
 return 1;
}
Please use PAWN tags or CODE tags next time instead of QUOTE tags.

PS:Not sure if this is correct as I'm on mobile.
Reply


Messages In This Thread
Unworking /v command. - by HenrySunseri - 27.12.2012, 03:17
Re: Unworking /v command. - by Lordzy - 27.12.2012, 03:26
Re: Unworking /v command. - by HenrySunseri - 27.12.2012, 03:30

Forum Jump:


Users browsing this thread: 1 Guest(s)