10.11.2014, 19:29
pawn Код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (PRESSED( KEY_FIRE ))
{
SetPlayerPos(playerid, X,Y,Z);
}
return 1;
}
/*
Example of script ;
*/
- Add that public, in your GM/Filescript. If you have it, only put define at the top of script and code inside public.