Help, Im sure this is a bug -
braduz - 10.02.2010
Код:
public OnPlayerEnterVehicle(playerid)
{
SetTimer("enter",5000,false);
return 1;
}
public OnPlayerExitVehicle(playerid)
{
SetTimer("exit",5000,false);
return 1;
}
public exit(playerid)
{
TextDrawHideForPlayer(playerid,Textdraw1);
}
public enter(playerid)
{
TextDrawShowForPlayer(playerid,Textdraw1);
}
returns errors===
//////////////////
: error 010: invalid function or declaration
C:\Users\Braduz\Desktop\Server\filterscripts\Stats .pwn(86) : error 001: expected token: "-identifier-", but found "exit"
C:\Users\Braduz\Desktop\Server\filterscripts\Stats .pwn(91) : error 025: function heading differs from prototype
Re: Help, Im sure this is a bug -
Joe Staff - 10.02.2010
which lines are have the error, and also take a look at your callbacks and make sure that the heading is the same on both the callback and the forward
ex:
forward enter(playerid,interiorid)
public enter(playerid) //<-- Not the same as above
Re: Help, Im sure this is a bug -
Oxside - 10.02.2010
You maybe setted the timer twice?
Re: Help, Im sure this is a bug -
yoan103 - 10.02.2010
Try this
Код:
public OnPlayerEnterVehicle(playerid);
{
SetTimer("enter",5000,false);
return 1;
}
public OnPlayerExitVehicle(playerid);
{
SetTimer("exit",5000,false);
return 1;
}
public exit(playerid);
{
TextDrawHideForPlayer(playerid,Textdraw1);
}
public enter(playerid);
{
TextDrawShowForPlayer(playerid,Textdraw1);
}
Re: Help, Im sure this is a bug -
Correlli - 10.02.2010
OnPlayerEnterVehicle & OnPlayerExitVehicle callbacks have more than one parameter, check the wiki to learn more. Also, use SetTimerEx in this case if you want your script to work properly.
Re: Help, Im sure this is a bug -
RyDeR` - 10.02.2010
Note: Use SetTimerEx because when someone get in the vehicle and another one to and leaves it it will getting bugged.
Re: Help, Im sure this is a bug -
braduz - 10.02.2010
Quote:
|
Originally Posted by Don Correlli
OnPlayerEnterVehicle & OnPlayerExitVehicle callbacks have more than one parameter, check the wiki to learn more. Also, use SetTimerEx in this case if you want your script to work properly.
|
According to wiki it has one :/
and the other code that person gave me give me 8 errors
Re: Help, Im sure this is a bug -
Correlli - 10.02.2010
Quote:
|
Originally Posted by braduz
According to wiki it has one :/
|
No, it doesn't.
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle - params: playerid, vehicleid, ispassenger
https://sampwiki.blast.hk/wiki/OnPlayerExitVehicle - params: playerid, vehicleid
Re: Help, Im sure this is a bug -
braduz - 10.02.2010
Quote:
|
Originally Posted by Don Correlli
|
nvm, onplayerenter/exitvehicle is shitty and glitchy anyway

nvm
Re: Help, Im sure this is a bug -
Correlli - 10.02.2010
Quote:
|
Originally Posted by braduz
nvm, onplayerenter/exitvehicle is shitty and glitchy anyway 
nvm
|
No, it works just like it's meant to.