Invalid function or declaration
#1

Quote:

C:\Users\Desktop\SERVER\filterscripts\myscript.pwn (341) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Line 341


PHP Code:
public OnPlayerEnterVehicle(playerid5980)
{
    
SetPlayerWantedLevel(playerid6);
    
SendClientMessage(playeridRED"Law enforcement vehicle theft [WANTED LEVEL INCREASED]");
    return 
1;

Reply
#2

Yeah, it doesn't work like that. Check this example here: https://sampwiki.blast.hk/wiki/GetVehicleModel
Reply
#3

PHP Code:
public OnPlayerEnterVehicle(playerid5980
You must provide the parameter names:
PHP Code:
OnPlayerEnterVehicle(playeridvehicleidispassenger
Then you use the values in your code inside the callback's body:
PHP Code:
OnPlayerEnterVehicle(playeridvehicleidispassenger)

    if(
GetVehicleModel(vehicleid) == 598 && !ispassenger)
    {
        
SetPlayerWantedLevel(playerid6); 
        
SendClientMessage(playeridRED"Law enforcement vehicle theft [WANTED LEVEL INCREASED]"); 
        return 
1
    }

Reply
#4

Oh thank you . I searched but couldn't find that.

Thank you.
Reply
#5

xDDDD
Reply
#6

How to add it for a selected class ?
Ex: only when civilians enter in veh will get wanted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)