Need Help With 2 Commands!
#1

Hello All And Welcome I Have make this topic to say that i need 2 command that i cant do it right its hards but there some poeple who know script i need from you! help please! here what i need:


to every server there is stats for player:

Kills:
Deaths:
Level:
IP:
Scores:
Cashes:
Banned:
Jailed:

like this to every server now what i need to command thats is /setkills and /setdeaths

i need help with it! so when i do Example: ( /setkills 10 50 ) <-- Like This

In the stats file inside server files make it like this


Kills: 50
Deaths:
Level:
IP:
Scores:
Cashes:
Banned:
Jailed:


same as /setdeaths but please i realy need this 2 commands helP! me and here is the code i make and it not work!

Код:
dcmd_setkills(playerid,params[])
{
    if(Player[playerid][admin] < 3)return 0
    new pID, aname[24], playerfile[100];
    new Kills = Player[pID][Kills];
    GetPlayerName(pID,pname,sizeof(pname));
    format(playerfile,sizeof(playerfile),"Lsgw/Users/%s.ini",pname);
    if(!IsPlayerConnected(pID)) return 0;
    if(sccanf(params,"us",pID,Kills) return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /setkills [playerid] [kils] ||");
    dini_IntSet(playerfile,"Kills",Kills);
    return 1;
}
Reply
#2

Nvm, misreaded
Reply
#3

pawn Код:
dcmd_setkills(playerid,params[])
{
    if(Player[playerid][admin] < 3)return 0;
    new pID, Kills;
    if(sscanf(params,"ud",pID,Kills)) return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /setkills [playerid] [kills] ||");
    if(!IsPlayerConnected(pID)) return 0;
    new pname[24], playerfile[100];
    GetPlayerName(pID,pname,sizeof(pname));
    format(playerfile,sizeof(playerfile),"Lsgw/Users/%s.ini",pname);
    dini_IntSet(playerfile,"Kills",Kills);
    return 1;
}
Reply
#4

I Will try it
Reply
#5

Thank you very much bro you are realy help me! thanks again hope you get nice luck! man ! :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)