How to use /spree (rep++)
#1

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..
Reply
#2

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

my server is not hosted yet...
Reply
#4

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..
Reply
#5

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;
}
Reply
#6

Mhm.. yea i forgot ")"
Reply
#7

Код:
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;
}
==
Reply
#8

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]++;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)