Set Score Cash to Kills
#1

Hai !

I use an xp fs and a rank one , but I need to change the score , from cash to kills .
Does anyone knows how to change it ?

Thanks .
Reply
#2

under public OnPlayerUpdate(playerid) delete SetPlayerScore(playerid, GetPlayerMoney(playerid));
next thing you wanna do is
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    return 1;
}
and thats it
Reply
#3

Score and money
try this
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    SetPlayerScore(killerid,GetPlayerScore(killerid)+1);//for score
    SetPlayerMoney(killerid,GetPlayerMoney(killerid)+1000);//for money, u can change it
    return 1;
}
Reply
#4

Thanks very much guys !
But mr. , then it says that SetPlayerMoney is an undefined symbol :/ .
Reply
#5

pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    SetPlayerScore(killerid,GetPlayerScore(killerid)+1);//for score
    GivePlayerMoney(killerid,GetPlayerMoney(killerid)+1000); // CHANGED
    return 1;
}
Reply
#6

Omfg, GivePlayerMoney detects the player money automatically
pawn Код:
GivePlayerMoney(killerid, 1000);
Reply
#7

Thanks all !

Then by the way , instead posting another topic I'll announce my last problem :

On the server , when a player kill another player , the draw text show this : "Superman Killed Rambo
Rambo Killed Superman" but only one player killed the other one .

That's really strange because I don't have "SendDeathMessage" anywhere in my script .

( I have only "SetPlayerScore(killerid,GetPlayerScore(killerid)+ 1);//for score
GivePlayerMoney(killerid,GetPlayerMoney(killerid)+ 1000);

and the little script in OnVehicleDeath )
Reply
#8

or use this:
pawn Код:
stock SetPlayerMoney(playerid, money)
{
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, money);
    return 1;
}
Edit:
are you sure you have it nowhere?

press strg+f and enter the text of the message... remove the code of this message.... otherwise check the filterscripts you have loaded... it can also be in 1 of them
Reply
#9

Quote:
Originally Posted by Steeve_Smith
Посмотреть сообщение
Thanks all !

Then by the way , instead posting another topic I'll announce my last problem :

On the server , when a player kill another player , the draw text show this : "Superman Killed Rambo
Rambo Killed Superman" but only one player killed the other one .

That's really strange because I don't have "SendDeathMessage" anywhere in my script .

( I have only "SetPlayerScore(killerid,GetPlayerScore(killerid)+ 1);//for score
GivePlayerMoney(killerid,GetPlayerMoney(killerid)+ 1000);

and the little script in OnVehicleDeath )
Fixed .

Thanks all !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)