[Project:Ultimate] I need to make this into an admin cmd - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Project:Ultimate] I need to make this into an admin cmd (
/showthread.php?tid=462139)
[Project:Ultimate] I need to make this into an admin cmd -
DeMotion - 05.09.2013
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!
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;
}
Re: [Project:Ultimate] I need to make this into an admin cmd -
IceBilizard - 05.09.2013
pawn Код:
COMMAND:veh(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
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]");
}
}
else
{
SCM(playerid, COLOR_RED, "ERROR: You are not Rcon Administrator");
}
return 1;
}
Re: [Project:Ultimate] I need to make this into an admin cmd -
DeMotion - 05.09.2013
Thank you!
Re: [Project:Ultimate] I need to make this into an admin cmd -
IceBilizard - 05.09.2013
You Welcome buddy