Adding Unlimited Nos.
#1

http://pastebin.com/GjVrNnd4
ERRORS: C:\Users\M4z\Desktop\Pawno\gamemodes\FunServer.pwn (919) : error 017: undefined symbol "PRESSED"
C:\Users\M4z\Desktop\Pawno\gamemodes\FunServer.pwn (924) : error 017: undefined symbol "RELEASED"
Reply
#2

Look, just remove this (you really dont need this):
Код:
else if (RELEASED(KEY_FIRE))
        {
        if(IsPlayerInAnyVehicle(playerid))
        RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
And copy/paste the rest of code from:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
To:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Should work! Here is my example:
Код:
if(PRESSED(KEY_FIRE))
	{
		for(new i = 0; i<MAX_PLAYERS; i++)
        {
                 new vehicle = GetPlayerVehicleID(i);
                 AddVehicleComponent(vehicle, 1010);
        }
	}
	return 1;
}
Reply
#3

Add in the top of script

pawn Код:
#define PRESSED(%0)\
            (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Edit: Wow to slow
Reply
#4

Wow, I just realised, its the wrong callback, fail..
Thanks for the information.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)