Help 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (
/showthread.php?tid=204389)
Help please -
bartje01 - 29.12.2010
Hy guys.
I have a little problem
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetPlayerVehicleID(vehicleid) == bmx1||bmx2||bmx3)
{
if(postjob[playerid] == 0)
{
SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+1);
}
}
return 1;
}
I want that you only can't join the 3 bmxs. but when I put this in I can't enter any car anymore.
How to fix?
Re: Help please -
thimo - 29.12.2010
Change the Bmx1,2,3 just to the id of the bmx itself
AW: Help please -
Jonni8 - 29.12.2010
Just use:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == bmx1||bmx2||bmx3)
{
if(postjob[playerid] == 0)
{
SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+1);
}
}
return 1;
}
Re: Help please -
bartje01 - 29.12.2010
jonni. YOur code didn't work either
Re: Help please -
bartje01 - 29.12.2010
Someone else an idea?
Re: Help please -
thimo - 29.12.2010
Maybe use a else statement for all other cars
Re: Help please -
bartje01 - 29.12.2010
How can I do that?
Re: Help please -
thimo - 29.12.2010
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetPlayerVehicleID(vehicleid) == bmx1||bmx2||bmx3)
{
if(postjob[playerid] == 0)
{
SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+1);
}
}
else
{
//put the code for normal vehicles here something like above
}
return 1;
}
Re: Help please -
Marricio - 29.12.2010
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == bmx1 || vehicleid == bmx2 || vehicleid == bmx3)
{
if(postjob[playerid] == 0)
{
SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+1);
}
}
return 1;
}
that should work
Re: Help please -
bartje01 - 29.12.2010
didn't work either. this is strange