Easy cmd help - 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: Easy cmd help (
/showthread.php?tid=533134)
Easy cmd help -
Gogeta101 - 22.08.2014
I tried to script this one like this but errors
PHP код:
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
if(Player[playerid][pAdmin] >= 1)
if(!IsPlayerInAnyVehicle) return SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
{
RepairVehicle(GetPlayerVehicleID);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command"
}
return 1;
}
Re: Easy cmd help -
Thogy - 22.08.2014
pawn Код:
if (strcmp("/fix", cmdtext, true, 4) == 0)
{
if(Player[playerid][pAdmin] >= 1)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
RepairVehicle(GetPlayerVehicleID);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
}
return 1;
}
Re: Easy cmd help -
AchievementMaster360 - 22.08.2014
pawn Код:
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
if(Player[playerid][pAdmin] >= 1)
{
if(IsPlayerInAnyVehicle)
{
RepairVehicle(GetPlayerVehicleID);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
}
return 1;
}
Code not tested
Re: Easy cmd help -
Gogeta101 - 22.08.2014
syntax error in the expression, or invalid function call
syntax error in the expression, or invalid function call
Re: Easy cmd help -
nmader - 22.08.2014
pawn Код:
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
if(Player[playerid][pAdmin] >= 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
}
return 1;
}