Removing a part of this - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Removing a part of this (
/showthread.php?tid=238664)
Removing a part of this -
patfay - 12.03.2011
Okay well I have a command that allows admins to fix a car
Код:
command(afix, playerid, params[])
{
#pragma unused params
if(Player[playerid][AdminLevel] >= 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(Player[playerid][CarModDelay] == 0)
{
if(GetPlayerSpeed(playerid, 0) == 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, WHITE, "You have fixed your vehicle.");
Player[playerid][CarModDelay] = 1;
}
else
{
SendClientMessage(playerid, WHITE, "You must stop your vehicle first.");
}
}
else
{
SendClientMessage(playerid, WHITE, "Please wait your reload time (60 seconds).");
}
}
}
return 1;
}
How would I make it so that admins can do it without a time limit, or at any speed
Re: Removing a part of this -
antonio112 - 12.03.2011
pawn Код:
command(afix, playerid, params[])
{
#pragma unused params
if(Player[playerid][AdminLevel] >= 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, WHITE, "You have fixed your vehicle.");
}
}
return 1;
}
Try like this.
Re: Removing a part of this -
patfay - 12.03.2011
Works thanks