Confused.. help me please - 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: Confused.. help me please (
/showthread.php?tid=639675)
Confused.. help me please -
Puff - 21.08.2017
Код:
if(model != 403 || model != 515) {
SendClientMessage(playerid, X11_TOMATO_2, "You must be in a truck!");
return 1;
this is the code.. even when Im in those 2 trucks it still says you must be in a truck... why
Re: Confused.. help me please -
HoussemGaming - 21.08.2017
Show us all the command or the function
Re: Confused.. help me please -
Puff - 21.08.2017
Quote:
Originally Posted by HoussemGaming
Show us all the command or the function
|
There you go:
Код:
YCMD:startjob(playerid, params[], help)
{
new carid = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(carid);
new job = GetPVarInt(playerid, "Job");
if(!IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid, X11_TOMATO_2, "You aren't in a car");
return 1;
}
if(model != 403 || model != 515) {
SendClientMessage(playerid, X11_TOMATO_2, "You must be in a truck!");
return 1;
}
if(job != EJobType_Smuggler)
{
SendClientMessage(playerid, X11_TOMATO_2, "You must be a Trucker for this!");
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
if(truckerjob[playerid] == 1)
{
SendClientMessage(playerid, X11_TOMATO_2, "You can't do this right now");
return 1;
}
if(!IsTrailerAttachedToVehicle(vehicleid))
{
SendClientMessage(playerid, X11_WHITE, "Please attach the trailer to start the job!");
return 1;
}
truckerjob[playerid] = 1;
startSmugglerRoute(playerid);
return 1;
}
Re: Confused.. help me please -
Kane - 21.08.2017
Change the || to an &&.
Re: Confused.. help me please -
Puff - 21.08.2017
Quote:
Originally Posted by Arthur Kane
Change the || to an &&.
|
Thanks, fixed +rep