01.05.2012, 20:56
I have made a command /veh and how to put player in vehicle when he enter the id of that car and color?
pawn Код:
CMD:veh(playerid, params[])
{
if(PI[playerid][Admin] >=1 || IPA(playerid))
{
new veh,color1,color2, string[128];
if (!sscanf(params, "iii", veh, color1,color2))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
AddStaticVehicle(veh, x,y,z,0,color1, color2);
PutPlayerInVehicle(playerid, veh, 0);
format(string, sizeof(string), ""COL_SVIJETLOPLAVA"| FriXion | Spawnao si sebi vozilo "COL_SVIJETLOPLAVA"%s(ID: %d)", ImenaVozila, veh);
SCM(playerid, BIJELA, string);
}
else SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"/veh [ID Auta] [Boja 1] [Boja 2]");
}
else SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"Zao nam je,nemate mogucnost da koristite ovu komandu.");
return 1;
}