SA-MP Forums Archive
Need Help With 2 Commands! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help With 2 Commands! (/showthread.php?tid=255997)



Need Help With 2 Commands! - [Lsgw]LoL - 18.05.2011

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;
}



Re: Need Help With 2 Commands! - DeathOnaStick - 18.05.2011

Nvm, misreaded


Re: Need Help With 2 Commands! - MadeMan - 18.05.2011

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;
}



Re: Need Help With 2 Commands! - [Lsgw]LoL - 18.05.2011

I Will try it


Re: Need Help With 2 Commands! - [Lsgw]LoL - 18.05.2011

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