05.09.2013, 14:08
Hello, I need to turn this code right here into an admin cmd.
Like when you login to /rcon login password, you are allowed to use it.
If you're not logged in, you get an error message.
Thanks!
Like when you login to /rcon login password, you are allowed to use it.
If you're not logged in, you get an error message.
Thanks!
pawn Код:
COMMAND:veh(playerid, params[])
{
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
PutPlayerInVehicle(playerid, vin, 0);
}else{
SCM(playerid, COLOR_RED, "ERROR: This command requires: /veh [vehicleid][color1][color2]");
}
return 1;
}