11.05.2009, 16:24
Код:
if(strcmp(cmd, "/hyd", true) == 0)
{
if(IsPlayerConnected(playerid)) // AddVehicleComponent(vehicle, 1009); // Nitro
{
if (PlayerInfo[playerid][pJob] == 7)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
AddVehicleComponent(GetPlayerVehicleID, 1087);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(playerid, -1000);
format(string, sizeof(string), "*Mechanic %s adds Hydraulics to the Vehicle", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to be a Mechanic to use this command!");
}
}
return 1;
}
C:\Users\Zak\Desktop\larp.pwn(30031) : error 076: syntax error in the expression, or invalid function call
The error is the line with 'AddVehicleComp', and that is something i just randomly made so i knew i was going to get an error, or something like that.
All i need is someone to teach me how to get the vehicle id :d


.