Help me for kill player get cash/score and Commands Minigames
#1

HELP ME!!!

how if we kill the player will get a cash / score I've tried to make the script and the result does not work

and what filter script minigames?
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
        SetPlayerMoney(killerid, GetPlayerMoney(killerid) + 1000), SetPlayerScore(killerid, GetPlayerScore(killerid) + 100);
}
Give the killer 1000$ and 100 score.
Reply
#3

get a random cash / score ?
Reply
#4

For random money/score:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
        SetPlayerMoney(killerid, GetPlayerMoney(killerid) + random(5000)), SetPlayerScore(killerid, GetPlayerScore(killerid) + random(1000));
}
The killer will get random money from 0 - 5000$ and score from 0 - 1000.
Reply
#5

Код:
C:\Users\Home\Downloads\Compressed\MODE SAMP\SenjoritaGaming\gamemodes\SanjoritaGaming.pwn(2366) : error 021: symbol already defined: "OnPlayerDeath"
C:\Users\Home\Downloads\Compressed\MODE SAMP\SenjoritaGaming\gamemodes\SanjoritaGaming.pwn(2369) : warning 209: function "OnPlayerDeath" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
why ?
Reply
#6

pawn Код:
return 1;
And on your script the on player death callback is already used found it.
Reply
#7

not work :/ ERROR

Код:
C:\Users\Home\Downloads\Compressed\MODE SAMP\SenjoritaGaming\gamemodes\SanjoritaGaming.pwn(2365) : error 021: symbol already defined: "OnPlayerDeath"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#8

Quote:
Originally Posted by egysaputra
Посмотреть сообщение
Код:
C:\Users\Home\Downloads\Compressed\MODE SAMP\SenjoritaGaming\gamemodes\SanjoritaGaming.pwn(2366) : error 021: symbol already defined: "OnPlayerDeath"
C:\Users\Home\Downloads\Compressed\MODE SAMP\SenjoritaGaming\gamemodes\SanjoritaGaming.pwn(2369) : warning 209: function "OnPlayerDeath" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
why ?
Your gamemode / filtrer script already has a
pawn Код:
public OnPlayerDeath
Go to the first one and put
pawn Код:
{
    if(killerid != INVALID_PLAYER_ID)
        SetPlayerMoney(killerid, GetPlayerMoney(killerid) + random(5000)), SetPlayerScore(killerid, GetPlayerScore(killerid) + random(1000));
}
return 1;
Reply
#9

And you need to delete the second
pawn Код:
public OnPlayerDeath
at the ling 2536 I mean ...
Reply
#10

thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)