SetPlayerScore +rep
#1

I was working on SetPlayerScore as you know when someone Kills someone it gives +1 Score to him after getting 100 scores it gives player new rank from Newbie to Killa but to test my Ranks when i use /setscore 0 101 the Textdraw changes to killa but after 2 secs it becomes Newbie again and my Score in (tab) becomes 0 also i'm using gAdmin anyone know how to fix this shit?
Reply
#2

Do you have a timer for it ?
Reply
#3

No i have
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
btw which one is good?
Reply
#4

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
No i have
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
Show me the whole code.

EDIT: The first one.
Reply
#5

Well. Check if u got any ago cheat system that might be stoping to set score.
Or look for a timer that's SETS the score back to 0.
also Make sure the texture is [MAX_LLAYERS] so the player each will see there own string
Reply
#6

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
   //My Other script which have nothing to do with SetPlayerScore
i have no timer or anything..
Reply
#7

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
// Add 1 to this killer's score.
    
if(killerid != INVALID_PLAYER_IDSetPlayerScore(killeridGetPlayerScore(killerid) + 1);
    return 
1;

This should work fine, check your script, and are you using it in a filterscript ?
Reply
#8

Show the code where ur formatting the Killer and Newbie
Reply
#9

Not Fs.... what i did is Just Gone to onPlayerDeath and added this script
pawn Код:
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
Reply
#10

Oh here
pawn Код:
public OnPlayerUpdate(playerid)
    {
    if GetPlayerScore(playerid) >= NEWBIESCORE && GetPlayerScore(playerid) <=NEWBIESCORETO*then
    {
    TextDrawUseBox(Textdraw3, 1);
    TextDrawBoxColor(Textdraw3, 0x00000000);
    TextDrawSetShadow(Textdraw3,0);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid,Textdraw8);
    }
    if GetPlayerScore(playerid) >= KILLASCORE && GetPlayerScore(playerid) <=KILLASCORETO*then
    {
    TextDrawUseBox(Textdraw4,1);
    TextDrawBoxColor(Textdraw4, 0x00000000);
    TextDrawSetShadow(Textdraw4,0);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid,Textdraw8);
    }
    if GetPlayerScore(playerid) >= YOUNGGSCORE && GetPlayerScore(playerid) <=YOUNGGSCORETO*then
    {
    TextDrawUseBox(Textdraw5, 1);
    TextDrawBoxColor(Textdraw5, 0x00000000);
    TextDrawSetShadow(Textdraw5,0);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid,Textdraw8);
    }
    if GetPlayerScore(playerid) >= MOBSTASCORE && GetPlayerScore(playerid) <=MOBSTASCORETO*then
    {
    TextDrawUseBox(Textdraw6, 1);
    TextDrawBoxColor(Textdraw6, 0x00000000);
    TextDrawSetShadow(Textdraw6,0);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid,Textdraw8);
    }
    if GetPlayerScore(playerid) >=GANGSTASCORE && GetPlayerScore(playerid) <=GANGSTASCORETO*then
    {
    TextDrawUseBox(Textdraw7, 1);
    TextDrawBoxColor(Textdraw7, 0x00000000);
    TextDrawSetShadow(Textdraw7,0);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid,Textdraw8);
    }
    if GetPlayerScore(playerid) >=BOSSSCORE*then
    {
    TextDrawUseBox(Textdraw8, 1);
    TextDrawBoxColor(Textdraw7, 0x00000000);
    TextDrawSetShadow(Textdraw7,0);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw4);
    }
    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)