/uninvite
#1

pawn Код:
CMD:uninvite(playerid, params[])
 {
  new sendername[MAX_PLAYER_NAME];
  new giveplayer[MAX_PLAYER_NAME];
  new string[128];
   
     if(IsPlayerConnected(playerid))
     {
   new idx;
   temp = strtok(params, idx);
   if(!strlen(temp))
   {
    SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /uninvite {959561}[ID/PartOfName] {838361}");
    return 1;
   }
   new para1;
   para1 = ReturnUser(temp);
   if (PlayerInfo[playerid][pLeader] >= 1)
   {
       if(IsPlayerConnected(para1))
       {
           if(para1 != INVALID_PLAYER_ID)
           {
         if (PlayerInfo[para1][pMember] > 0)
         {
       if(PlayerInfo[playerid][pLeader] == PlayerInfo[para1][pMember])
       {
       GetPlayerName(para1, giveplayer, sizeof(giveplayer));
       GetPlayerName(playerid, sendername, sizeof(sendername));
       
       format(string, sizeof(string), "* You have been kicked out from org. from leader: %s.", sendername);
       SendClientMessage(para1, COLOR_LIGHTBLUE, string);
       SendClientMessage(para1, COLOR_LIGHTBLUE, "* You are civilian.");
                   gTeam[para1] = 3;
       PlayerInfo[para1][pTeam] = 3;
       PlayerInfo[para1][pMember] = 0;
       PlayerInfo[para1][pRank] = 0;
       PlayerInfo[para1][pChar] = 0;
       new rand = random(sizeof(CIV));
       SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
       PlayerInfo[para1][pModel] = CIV[rand];
       MedicBill[para1] = 0;
       SpawnPlayer(para1);
       format(string, sizeof(string), "   You kick out %s from your mafia.", giveplayer);
       SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
       }
       else return SCM(playerid, COLOR_RED, "you can not kick out meamber that he isnt in your org.i!");
      }
     }
    }//not connected
   }
   else
   {
    SendClientMessage(playerid, COLOR_GRAD1, "   You can do that(Leaders only)!");
   }
  }
  return 1;
 }
Can someone make this command, that kick player if he is not online, the leader can kick him out from org. if he is not on the server??

Are you need something else from script?
Reply
#2

Use dini_IntSet to set the value at that player's file.
Reply
#3

Quote:
Originally Posted by pawn++
Посмотреть сообщение
Use dini_IntSet to set the value at that player's file.
ok, but that is not my problem :S
Reply
#4

Give me a function where you saving player stats to file. I need pMember.
Reply
#5

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Give me a function where you saving player stats to file. I need pMember.
pawn Код:
format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
                format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
                format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
                format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
                format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
Reply
#6

bump, can someone helps me :S
Reply
#7

Open player file, set pMember = 0 and save and close in command.
Reply
#8

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Open player file, set pMember = 0 and save and close in command.
i now what i need do but i dont now how to do this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)