Command /setkills how i should make it?
#1

Hello i need your help wery fast how i need create simple command which give me one frag or more. I Need it for test
me variable "pKills"
Reply
#2

on code no help.
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
on code no help.
Seriously?
Reply
#4

It's not request script section.
Show your code and we should able to help you.
Reply
#5

Well ignore this post. I will call me friend for test.
Reply
#6

Quote:
Originally Posted by henkas
Посмотреть сообщение
Well ignore this post. I will call me friend for test.
Would've thought that such a simple command setup would've been learnt over a year, and 150+ posts...


Learn to script, I'd have thought that someone would've told you that in all your time of requesting code...
Reply
#7

Example code, learn from this so in the future when you need help, post the problem you have with the code that you currently have otherwise dont expect help.

pawn Код:
enum P_DATA {
    pKills,
    pDeaths
}
new pInfo[MAX_PLAYERS][P_DATA]; /* Hooking pInfo to player and some P_DATA so we can use pInfo[playerid][pKills] += 1; etc. */

public OnPlayerDeath(playerid, killerid, reason)
{
    pInfo[playerid][pDeaths] += 1; //adding 1 death to players deaths

    if(killerid != INVALID_PLAYER_ID) { //if the killer exists, making sure player didnt die by falling, admin killed etc.
        pInfo[killerid][pKills] += 1; //adding 1 more kill to the killer
        new string[64];
        format(string,sizeof(string),"You have %i kills in total",pInfo[killerid][pKills]);
        SendClientMessage(killerid,COLOR_GREEN,string);
    }
    return 1;
}

CMD:addkills(playerid,params[]) {
    new kills;
    if(sscanf(params,"i",kills)) return SendClientMessage(playerid,COLOR_RED,"Usage: /addkills [kills]");
    pInfo[playerid][pKills] += kills; //adds to current kills
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)