different score by kills
#1

Well,

now I got it like this:
1kill= +10score

Is it possible to set that like this:
grenade kill= +25score
sniper kill= +15score
combat shotgun kill= +10score
mp5 kill= +10score
Reply
#2

Quote:
Originally Posted by PANNA
Well,

now I got it like this:
1kill= +10score

Is it possible to set that like this:
grenade kill= +25score
sniper kill= +15score
combat shotgun kill= +10score
mp5 kill= +10score
Grenade won't work (because there is no actual reason for "explosion") , but the rest will. Just use the variable "reason" that is in OnPlayerDeath(playerid, killerid, reason), like this:

pawn Код:
SetPlayerScore(killerid, +10);

if(reason==31)SetPlayerScore(killerid, +5); // if the kill is with M4....
if(reason==29)SetPlayerScore(killerid, +3); // if the kill is with SMG....
The "+10" is the score, the player gets, doesnt matter what weapon, and the rest, is bonus for the weapon. Just get the weapon-id's as the "reason" and replace it in this if-condition. I hope that i could help you out.

Cheers.
Reply
#3

Im pretty sure u can do grenades, i remember on my old server i had achievments and one of them was 25 grenade kills or sumin...
Reply
#4

Quote:
Originally Posted by Mowgli
Im pretty sure u can do grenades, i remember on my old server i had achievments and one of them was 25 grenade kills or sumin...
Well, i tried it and it didnt work at my server. Maybe there is a other possibility to get that, instead of putting the weapon id into, for the "reason".
Reply
#5

pawn Код:
{
    SetPlayerScore(killerid, +10);      <------ (79)
    if(reason==34)SetPlayerScore(killerid, +5);
    GameTextForPlayer(killerid, "+15!", 3000,4);
    return 1;
}

C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(51) : warning 202: number of arguments does not match definition
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(52) : warning 202: number of arguments does not match definition
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(53) : warning 202: number of arguments does not match definition
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(79) : error 029: invalid expression, assumed zero
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(79) : warning 215: expression has no effect
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(79) : error 001: expected token: ";", but found ")"
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(79) : error 029: invalid expression, assumed zero
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(79) : fatal error 107: too many error messages on one line
Reply
#6

pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
This should fix it.


Cheers.
Reply
#7

Quote:
Originally Posted by ∈ⅹitus
pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
This should fix it.


Cheers.
pawn Код:
{
    SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
    if(reason==34)SetPlayerScore(killerid, +5);  <----- 80
    GameTextForPlayer(killerid, "+15!", 3000,4);
    return 1;
}
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(80) : error 029: invalid expression, assumed zero
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(80) : warning 215: expression has no effect
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(80) : error 001: expected token: ";", but found ")"
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(80) : error 029: invalid expression, assumed zero
C:\Users\Onno\Documents\ALLIN1\da\gamemodes\cod.pw n(80) : fatal error 107: too many error messages on one line
Reply
#8

?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)