Poll

Howz This System?

Best
2 (50%)
Good
0 (0%)
Bad
1 (25%)
Thank You
0 (0%)
Nice!
1 (25%)

Total Members Voted: 3

Author Topic: [ Working ] Transferstats [ GUPS ]  (Read 3104 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
[ Working ] Transferstats [ GUPS ]
« on: January 30, 2014, 07:19:38 pm »
Put THis CMD

Quote
      else if (strcmp(cmd, "transferstats", true) == 0) {
      new plr, plrr, szMsg[256];
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      plrr = FindPlayerIDFromString(tmp);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
   ///   else if(!IsPlayerCommandLevel(playerid,"transferstats")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c transferstats [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
        else if(!IsPlayerRegistered(gPlayers[plrr])) {
         format(szMsg,sizeof(szMsg),"Error: %s is not a registered nick!",gPlayers[plrr]);
         SendClientMessageToAll(COLOR_GREEN,szMsg);
      }
      else {
      new OLDKILLS[MAX_PLAYERS];
  new OLDDEATHS[MAX_PLAYERS];
         format(file, sizeof(file), USERS_FILE, gPlayers[plr]);
   OLDKILLS[plr] = dini_Int(file, "Kills");
   OLDDEATHS[plr] = dini_Int(file, "Deaths");
   
            format(file, sizeof(file), USERS_FILE, gPlayers[plrr]);
            
       dini_Set(file, "Deaths", OLDDEATHS[playerid]);
         dini_Set(file, "Kills", OLDKILLS[playerid]);

   format(szMsg,sizeof(szMsg),"%s's stats transfered to %s.",gPlayers[plr], gPlayers[plrr]);
         SendClientMessage(playerid,COLOR_GREEN,szMsg);
      
              format(file, sizeof(file), USERS_FILE, gPlayers[plr]);
     dini_Set(file, "Deaths", "0");
         dini_Set(file, "Kills", "0");   
         
      }
      return 1;
   }

Thats All

By Me!

Working Now!!!

My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol