*** Terrible Title Removed -
PAWNO-ANFДNGER - 26.10.2012
Hey buddys!
little problem, I know, itґs a stupid topic but, I dont know, what I do wrong!
Iґm sorry, if I write too much in "Scripting Help", but I want to finish my CarHouseSystem.
Here is the stupid error(sorry for this word)
PHP Code:
Line (341): The number of parameters is incorrect
And the code:
PHP Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 0; i < sizeof(grotticars); i++)
{
if(OnPlayerEnterVehicle(playerid, vehicleid) == grotticars[i]) //error is here
{
TogglePlayerControllable(playerid, true);
}
else
{
}
}
I have more from code, but the rest of the code does not match to this
I want, when the player is in the car, he can do nothing, so I try that. but...
THEEESE warning..
And a Question too, how you can start the pawn code?
also (php) script(/php) how do you do that?
Re: Problem-- -
CoaPsyFactor - 26.10.2012
hahahahahaahhhaahahah, you can't check call back
use if(vehicleid == grotticars[i]) instead of if(OnPlayerEnterVehicle(playerid, vehicleid) == grotticars[i])
AW: *** Terrible Title Removed -
PAWNO-ANFДNGER - 26.10.2012
You dont know what I mean...
The player must be in the car, if i push f, he do nothing, he cant go into the car...
I dont know, how I write that like that, that what youґve is good, but I stay only and dont join in the car.
If I do my code, I can go into the car, but I can do nothing, that is, what I want..
Please help..
Re: Problem with code, Please help -
CoaPsyFactor - 26.10.2012
yes, you need to check with vehicleid == grotticars, but if you want to get in vehicle and then freez player you can't do that in this callback, because this is called when player press F and start getting in car, you should put it in OnPlayerStateChange, and check is players state driver
AW: Problem with code, Please help -
PAWNO-ANFДNGER - 26.10.2012
Ouuuuh
Sorry, my mistake
Re: Problem with code, Please help -
CoaPsyFactor - 26.10.2012
look, I haven't told you, when you want to check vehicles id in OnPlayerStateChange, you need to do vehicleid = GetPlayerVehicleID(playerid)
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid;
if(newstate == PLAYER_STATE_DRIVER){
vehicleid = GetPlayerVehicleID(playerid);
// and then you loop through grotti cars :D
}
AW: *** Terrible Title Removed -
PAWNO-ANFДNGER - 26.10.2012
Edit:
All perfect, I love you
THANX ALLOT!
Re: *** Terrible Title Removed -
CoaPsyFactor - 26.10.2012
np
I'm glad I helped