SA-MP Forums Archive
How to use /spree (rep++) - 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: How to use /spree (rep++) (/showthread.php?tid=337997)



How to use /spree (rep++) - iOmar - 28.04.2012

Guys i have killing spree system. I want that when player type /spree than it will show that: "you are on spree of 1 or 2 or his kill before he died. As player died all /spree will gone.. Please help me..


Re: How to use /spree (rep++) - Mark Shade - 28.04.2012

Send me forum pm of ur servers ip ill help u out


Re: How to use /spree (rep++) - iOmar - 28.04.2012

my server is not hosted yet...


Re: How to use /spree (rep++) - Rudy_ - 28.04.2012

pawn Код:
COMMAND:spree(playerid, params[])
{
    if(KillingSpree[playerid] = 0) return SendClientMessage(playerid, -1, "You are not on Killing spree");
    if(KillingSpree[playerid] = 3) return SendClientMessage(playerid, -1, "You are on killing spree of 3 kills");
    if(KillingSpree[playerid] = 6) return SendClientMessage(playerid, -1, "You are on killing spree of 6 Kills");
    // And more..
    return 1;
}
Btw, you need
Код:
 new KillingSpree[MAX_PLAYERS];
On Top..


Re: How to use /spree (rep++) - zSuYaNw - 28.04.2012

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
pawn Код:
COMMAND:spree(playerid, params[])
{
    if(KillingSpree[playerid] = 0; return SendClientMessage(playerid, -1, "You are not on Killing spree");
    if(KillingSpree[playerid] = 3; return SendClientMessage(playerid, -1, "You are on killing spree of 3 kills");
    if(KillingSpree[playerid] = 6; return SendClientMessage(playerid, -1, "You are on killing spree of 6 Kills");
    // And more..
    return 1;
}
Btw, you need
Код:
 new KillingSpree[MAX_PLAYERS];
On Top..
Error,
pawn Код:
COMMAND:spree(playerid, params[])
{
    if(KillingSpree[playerid] = 0) return SendClientMessage(playerid, -1, "You are not on Killing spree");
    if(KillingSpree[playerid] = 3) return SendClientMessage(playerid, -1, "You are on killing spree of 3 kills");
    if(KillingSpree[playerid] = 6) return SendClientMessage(playerid, -1, "You are on killing spree of 6 Kills");
    // And more..
    return 1;
}



Re: How to use /spree (rep++) - Rudy_ - 28.04.2012

Mhm.. yea i forgot ")"


Re: How to use /spree (rep++) - ReVo_ - 28.04.2012

Код:
COMMAND:spree(playerid, params[])
{
    if(KillingSpree[playerid] == 0) return SendClientMessage(playerid, -1, "You are not on Killing spree");
    if(KillingSpree[playerid] == 3) return SendClientMessage(playerid, -1, "You are on killing spree of 3 kills");
    if(KillingSpree[playerid] == 6) return SendClientMessage(playerid, -1, "You are on killing spree of 6 Kills");
    // And more..
    return 1;
}
==


Re: How to use /spree (rep++) - Mean - 28.04.2012

strcmp, really easy to convert to zcmd:
pawn Код:
// On top of the script:
new gpSpree[MAX_PLAYERS];

// OnPlayerCommandText code:
if(!strcmp(cmdtext, "/spree", true, 6)) {
    new str[55];
    format(str, sizeof str, "You're currently on a killing spree of %d kills.", gpSpree[playerid]);
    SendClientMessage(playerid, -1, str);
    return 1;
}

// OnPlayerConnect code:
gpSpree[playerid] = 0;

// OnPlayerDeath code:
gpSpree[playerid] = 0;
gpSpree[killerid]++;