command not working ZCMD -
NewerthRoleplay - 16.03.2012
Hi just finished making my job commands for a trucker job and even if i am in a Mule (414) and i am a trucker, i still cannot use /startjob, i dont get a error it just dosn't work. This time i made sure i included the return 1; at the end but i think this may be different. Here is the script for /startjob.
pawn Код:
CMD:startjob(playerid, params[])
{
if(IsPlayerInVehicle(playerid, 414))
{
if(pJob[playerid] == TRUCKER)
{
SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::.");
SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0);
trucking[playerid] = 1;
return 1;
}
SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::.");
}
return 1;
}
Re: command not working ZCMD -
McCarthy - 16.03.2012
pawn Код:
CMD:startjob(playerid, params[])
{
if(IsPlayerInVehicle(playerid, 414))
{
if(pJob[playerid] == TRUCKER)
{
SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::.");
SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0);
trucking[playerid] = 1;
return 1;
}
else SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::.");
}
return 1;
}
Re: command not working ZCMD -
NewerthRoleplay - 16.03.2012
Quote:
Originally Posted by McCarthy
pawn Код:
CMD:startjob(playerid, params[]) { if(IsPlayerInVehicle(playerid, 414)) { if(pJob[playerid] == TRUCKER) { SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::."); SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0); trucking[playerid] = 1; return 1; } else SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::."); } return 1; }
|
Well number 1, that didnt work and number 2. Im pretty sure that when you help somebody out your supposed to explain to them what you actually did instead of pasting code
Re: command not working ZCMD -
Fj0rtizFredde - 16.03.2012
You use the function wrong. IsPlayerInVehicle wants the vehicle id and not the model number. So you could check in the player is in any vehicle and use GetVehicleModel to check if it is 414.
Re: command not working ZCMD -
McCarthy - 16.03.2012
True, didn't pay that much attention D:
Re: command not working ZCMD -
NewerthRoleplay - 16.03.2012
Quote:
Originally Posted by Fj0rtizFredde
You use the function wrong. IsPlayerInVehicle wants the vehicle id and not the model number. So you could check in the player is in any vehicle and use GetVehicleModel to check if it is 414.
|
Thanks so much, about to test it right now
Re: command not working ZCMD -
NewerthRoleplay - 16.03.2012
Tested it, still the server didnt acknowledge the command, not even a not recognised command :/
Re: command not working ZCMD -
Quinlynn - 16.03.2012
Compile it.....
Re: command not working ZCMD -
NewerthRoleplay - 17.03.2012
Quote:
Originally Posted by Quinlynn
Compile it.....
|
...im not dumb i know how to compile, how else do you think it recognises everything else except from this. My script works just not this specific command