SA-MP Forums Archive
Give Player score and money if kill other players - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Give Player score and money if kill other players (/showthread.php?tid=522753)



Give Player score and money if kill other players - PowerF - 29.06.2014

can someone help me?

how do i give player money and score if kill other player.


+REP if can help me


Re: Give Player score and money if kill other players - PowerF - 29.06.2014

no one can help?


Re: Give Player score and money if kill other players - PowerF - 29.06.2014

please help me


Re: Give Player score and money if kill other players - JessThompson - 29.06.2014

For the money it is GivePlayerMoney(playerid, moneyhere);

and for the score it is depending on your saving system and score system, As my roleplay script uses the score as connected time so it all depends on your systems


Re: Give Player score and money if kill other players - mahardika - 29.06.2014

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed
 
    // Check that the killerid is valid before doing anything with it
    if(killerid != INVALID_PLAYER_ID)
    {
        GivePlayerMoney(killerid, xx); // change xx to amount of money do you want
        SetPlayerScore(playerid,GetPlayerScore(playerid)+xx); // change xx to score
    }

    return 1;
}



Re: Give Player score and money if kill other players - PowerF - 29.06.2014

12 Errors.


Re: Give Player score and money if kill other players - Ghazal - 29.06.2014

Quote:
Originally Posted by PowerF
Посмотреть сообщение
12 Errors.
Show us the errors.


Re: Give Player score and money if kill other players - PowerF - 29.06.2014

Код:
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3513) : error 054: unmatched closing brace ("}")
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3514) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3516) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3518) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3522) : error 021: symbol already defined: "format"
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3527) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3532) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3541) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3549) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3553) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3554) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(8691) : error 025: function heading differs from prototype
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(9177) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.



Re: Give Player score and money if kill other players - Don_Cage - 29.06.2014

Quote:
Originally Posted by mahardika
Посмотреть сообщение
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed
 
    // Check that the killerid is valid before doing anything with it
    if(killerid != INVALID_PLAYER_ID)
    {
        GivePlayerMoney(killerid, xx); // change xx to amount of money do you want
        SetPlayerScore(playerid,GetPlayerScore(playerid)+xx); // change xx to score
    }

    return 1;
}
Quote:
Originally Posted by PowerF
Посмотреть сообщение
Код:
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3513) : error 054: unmatched closing brace ("}")
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3514) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3516) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3518) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3522) : error 021: symbol already defined: "format"
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3527) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3532) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3541) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3549) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3553) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(3554) : error 010: invalid function or declaration
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(8691) : error 025: function heading differs from prototype
D:\Serial_Your Uninstaller PRO 7.5.2013.02 - www.bagas31.com\Administrator\Awesome Stunt Paradise\gamemodes\ASP.pwn(9177) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.
This is not just copy paste, you must change it so it fits your needs.. for example isnt xx a money value


Re: Give Player score and money if kill other players - PowerF - 29.06.2014

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
This is not just copy paste, you must change it so it fits your needs.. for example isnt xx a money value
yea i know

i changed point to 1 and money to 4000