OnPlayerDeath confusing me. ._.
#1

I'm not sure..i want to show a GameTextForPlayer About 'Wasted' when he is dead..no matter whatever time i change..the wasted appears like after 1 second if i spawn.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    PlayerInfo[playerid][pSpawn] = 0;
    GMT(playerid,"~r~~h~Wasted",1000,1);
In the above code the milliseconds are 1000 if i change them to 5000 their appearance time will be same as it was before..im not sure whats the problem..i want it to disappear at the same time when player repsawn and i guess its around 4000 milliseconds..

Secondly, Im not sure that after Players death the weapons gets reset? cause when i die..and if i have some weapon ill be still having them after respawn..is it normal? i mean do i need to manually reset the weapons using like -

pawn Код:
ResetPlayerWeapons(playerid);
Reply
#2

I tried it on my server, and it works fine...

Try it on a new gm, maybe it's your .amx file that's kinda bugged.
Reply
#3

ResetPlayerWeapons(playerid);

In the last line of OnPlayerSpawn, check your full code in case you have GivePlayerWeapon in OnPlayerSpawn
Reply
#4

Thanks Though, i didnt find any Giveplayerweapon in my playerspawn im gonna reset his weapons after death..
anyways the Gamemodetext is still a problem
Reply
#5

Yeah, I found that problem.
GameTextForPlayer(playerid, "Text," (miliseconds), (style) );
the type style is bugged.
Change that style type from 2 to 1 or 3, and it should be fixed.
Reply
#6

GameTextForPlayer(playerid,"~r~Wasted",4000,0);
Try this one out
Reply
#7

Wait. Ill try with Syle 2 (normal GTA SA one ^^)
Be right back.
Reply
#8

Golimad, lol that's basically what I said.
type 2 is bugged, as I mentioned.
Reply
#9

Thanks..it worked..it works purrrfect. +rep to ye both
Reply
#10

No problem, glad you fixed it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)