searching for a callback...
#1

What's the callback when player has f4 pressed and dies and what does he go to next? I want to disable f4 function. is it possible to disable it on player press f4 to not work or something? I have m own system of classes/whatever. Is it possible? And what do I need to change? I didn't script anything yet, just optimising my callbacks/code for now
Reply
#2

I don't think so. I think that this function includes in your SA-MP. But I'm not sure...
Reply
#3

Well, that F4 function is hardcoded into sa-mp ... When F4 is pressed and the player dies, the OnPlayerRequestClass is called.
Reply
#4

uh huh, ok. That means I can check if player recently died and if he goes to that function and spawn him reseting the params that are neededto be setted by my script, yes?
Reply
#5

I think you can go pass it by adding SpawnPlayer(playerid) under OnPlayerDeath
Reply
#6

Quote:
Originally Posted by Izanagi
uh huh, ok. That means I can check if player recently died and if he goes to that function and spawn him reseting the params that are neededto be setted by my script, yes?
one thing you can try is setting a flag in onplayerconnect as true, and then checking that flag in onplayerrequestclass. if flag is true, let them choose a skin and then set it to false. This way if they then re-enter onplayerrequestclass it will see that the flag is set to false and you can have it respawn the player without letting them select a new skin. Does that make any sense (i think im rambling)?
Reply
#7

that's a way, but they cannot spawn by selecting a class cause I use my login script to spawn them. Hmm.. I wonder what happens if I add no classes? I'll test that
Reply
#8

Probably you will just get stuck on the Vinewood screen since there are no classes to display.
Reply
#9

Nope, not stuck. only cannot spawn pp anyway since I use my login script to spawn players it's fine.
Reply
#10

The easiest way to disable the class selection is to put:
pawn Code:
SpawnPlayer(playerid);
under:
pawn Code:
OnPlayerRequestClass(playerid, classid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)