Hydcar 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: Hydcar help (
/showthread.php?tid=394786)
Hydcar help -
Joshswag - 24.11.2012
I've created a new job, a mechanic job, and a whole bunch of commands for it, They all seem fine.. Althought whenever I try to do the command in a vehicle, i get my return message saying i'm not in a vehicle, which i am.
heres my code for one of them.
Код:
if(strcmp(cmd, "/hydcar", true) == 0)
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You need to be in a vehicle to do this.");
{
if(PlayerInfo[playerid][pJob] != 10) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You're not a mechanic.");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully added hydraulics");
SendClientMessage(playerid, COLOR_ORANGE, "Beware, This modification is illegal in public areas");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
}
return 1;
}
Re: Hydcar help -
Rudy_ - 24.11.2012
Код:
if(strcmp(cmd, "/hydcar", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You need to be in a vehicle to do this.");
else
{
if(PlayerInfo[playerid][pJob] != 10) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You're not a mechanic.");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully added hydraulics");
SendClientMessage(playerid, COLOR_ORANGE, "Beware, This modification is illegal in public areas");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
}
return 1;
}
Re: Hydcar help -
Glad2BeHere - 24.11.2012
pawn Код:
if(strcmp(cmd, "/hydcar", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You need to be in a vehicle to do this.");
if(PlayerInfo[playerid][pJob] != 10) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] You're not a mechanic.");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully added hydraulics");
SendClientMessage(playerid, COLOR_ORANGE, "Beware, This modification is illegal in public areas");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
return 1;
}