SA-MP Forums Archive
/uninvite - 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: /uninvite (/showthread.php?tid=270711)



/uninvite - Speed - 21.07.2011

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?


Re: /uninvite - pawn++ - 21.07.2011

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


Re: /uninvite - Speed - 21.07.2011

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


Re: /uninvite - Riddick94 - 05.08.2011

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


Re: /uninvite - Speed - 06.08.2011

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



Re: /uninvite - Speed - 13.08.2011

bump, can someone helps me :S


Re: /uninvite - Riddick94 - 13.08.2011

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


Re: /uninvite - Speed - 13.08.2011

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