• Welcome to Vice City Multiplayer.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Madara

#31
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 20, 2011, 09:14:53 PM
lead the file .PWN and open it from there goes to the "public OnPlayerText (playerid, cmdtext)" and change this:

public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], tmp[256],tmp2[256],rules[256];
new idx, plr, Count, i;
new Float:x, Float:y, Float:z;
cmd = strtok(cmdtext, idx);
format(INFO,256, REGISTERS, gPlayers[playerid]);

   new spammer = (GetTickCount()-MSNCount[playerid])/MSNxSEC;
   MSNPlayer[playerid]+=spammer-1;
   if(MSNPlayer[playerid]>LIMIT_REP_SPAM)MSNPlayer[playerid]=LIMIT_REP_SPAM-1;
   if(MSNPlayer[playerid]<0)MSNPlayer[playerid]=-1;
       MSNCount[playerid]=GetTickCount();
       if(MSNPlayer[playerid]<0) {
       PlayerKicked(playerid,"Server","-"," NO SPAMM");
return 1;
   }
   
   else if (strcmp(cmd, cmd, true) == 0) {
       if (strcmp(cmd, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
       else {
    format(MSN,256,"%s", cmdtext);
            if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
            else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
return 1;
   }
   
   if (strcmp(cmd, "urbo", true) == 0 || strcmp(cmd, "turbo", true) == 0) {
       PlayerKicked(playerid,"Server","-"," Forbidden Text");
return 1;
   }



Dalate this:


   if (strcmp(cmd, cmd, true) == 0) {
       if (strcmp(cmd, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
       else {
    format(MSN,256,"%s", cmdtext);
            if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
            else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
return 1;
   } 


And change this code to a public, look:

public PlayerSpamming(playerid,cmd[],cmdtext[])
{
    if (strcmp(cmd, cmd, true) == 0) {
       if (strcmp(cmdtext, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
       else {
        format(MSN,256,"%s", cmdtext);
            if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
            else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
        }
}
return 1;
}


And paste this line in public "OnPlayerText(playerid, cmdtext[])", look:

public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], tmp[256],tmp2[256],rules[256];
new idx, plr, Count, i;
new Float:x, Float:y, Float:z;
cmd = strtok(cmdtext, idx);
format(INFO,256, REGISTERS, gPlayers[playerid]);
    PlayerSpamming(playerid,cmd,cmdtext);// <-- This line paste here.

    new spammer = (GetTickCount()-MSNCount[playerid])/MSNxSEC;
    MSNPlayer[playerid]+=spammer-1;
    if(MSNPlayer[playerid]>LIMIT_REP_SPAM)MSNPlayer[playerid]=LIMIT_REP_SPAM-1;
    if(MSNPlayer[playerid]<0)MSNPlayer[playerid]=-1;
        MSNCount[playerid]=GetTickCount();
        if(MSNPlayer[playerid]<0) {
        PlayerKicked(playerid,"Server","-"," Forbidden SPAMM");
return 1;
    }

   
#32
All functions used in this include all serve at 100%, now, if you misspell an argument, or is incomplete or not filled each of these arguments, you jump obio errors as you write is the function, now, if some reason, one of the functions are repeated, or you have it on your server, or who have placed a function with the same name to that, can fail..
#33
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 20, 2011, 05:48:20 PM
Quote from: Scripter on March 20, 2011, 02:23:42 PM
hh bug /c cmds working but u also added cmds in ! but they dont work /c spree work but !spree hh

this section is not working
for all cmds in !

public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], tmp[256],tmp2[256],rules[256];
new idx, plr, Count, i;
new Float:x, Float:y, Float:z;
cmd = strtok(cmdtext, idx);
format(INFO,256, REGISTERS, gPlayers[playerid]);

    new spammer = (GetTickCount()-MSNCount[playerid])/MSNxSEC;
    MSNPlayer[playerid]+=spammer-1;
    if(MSNPlayer[playerid]>LIMIT_REP_SPAM)MSNPlayer[playerid]=LIMIT_REP_SPAM-1;
    if(MSNPlayer[playerid]<0)MSNPlayer[playerid]=-1;
        MSNCount[playerid]=GetTickCount();
        if(MSNPlayer[playerid]<0) {
        PlayerKicked(playerid,"Server","-"," NO SPAMM");
return 1;
    }
   
    else if (strcmp(cmd, cmd, true) == 0) {
        if (strcmp(cmd, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
        else {
     format(MSN,256,"%s", cmdtext);
             if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
             else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
return 1;
    }



That is not a command, that is the anti-spam for those who write posts in a row.
#34
the random that is used to spawn, to span at a random location, is another type of code. This is just to choose a random player.
#35
No, the "RandPlayer ()" is to pick a player in the game at random.
#36
mIRC/pawn Scripting / Re: Help me Come here
March 20, 2011, 01:38:18 AM
Quoteplayerstats: 100kills 67deaths Tag:Crime boss Level:20
Command: !stats

Quoteplease Tell me how to use it im making sharks vs mario type server and  
Gametextbottom for players when 1 kills it shows 1/10
Show kills of teams

Quotemy server features
with rules, help, or what?

Quotelogin/register system
Registers system with commands login and other.

QuoteBuycar/sellcar system
Buycars System with commands: !sellcar, sharecar, !desharecar, !mycars, !mysharedcars.

Quotebounds set so players cant getoutta prawn island
how?, point select the player, picture?

Quotepickups teleports
Pickups to touch, teleported to a location?

Quote!shop and teleports to shop
how?, commands !gotoloc and !buywep, or what??


Quoteskin select in prawn island
skins which will be available when you are in selection?

Now, this means you want someone to create a server with these specifications, or am i wrong?
#37
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 19, 2011, 09:07:00 PM
Here are Madara.INC: http://forum.vicecitymultiplayer.com/index.php?topic=2553.0

This paste in your pawno, in folder include, where dini, dutil, dudb, etc..

Greetings. ;)
#38
ShowRoom (pawn) / New Include "Madara.INC" by Madara
March 19, 2011, 09:00:44 PM
Hi all, today i come bringing me back I did include, as indeed he uses my server WarChiefs v1.0.

   DOWNLOAD:Madara.INC to Mediafire  &  Madara.INC to Megaupload
 
This function is installed on your Pawn, where is the folder includes, where are the others include; dutils, dudb, dini, etc. ..

This include contains:

- New way of sending messages, example:
 
  MessagePM(playerid,colour, text);
  MessagePMFormat(playerid,colour, text, consulte); -- > Example: MessagePMFormat(playerid,colour, "%s has joined server.",  PlayerName(playerid));
  MessageAll(colour, text);
  MessageAllFormat(colour, text, consulte); --> Example:   MessageAll(colour, "Auto-kick %s, ID %d - Reason:[ Bla Bla ].",PlayerName(playerid,playerid);

- New way of sending game text, example:

  TextBigPMFormat(playerid, game text, consulte); --> Example: TextBigPMFormat(playerid, "welcome %s to server", PlayerName(playerid));
  TextBigAllFormat(game text, consulte); --> Example: TextBigAllFormat("Rand Player: Find %s", PlayerName(playerid));
  BottomBigPMFormat(playerid, game text bottom, consulte); --> Too to TexBigPMFormat but in bottom text.
  BottomBigAllFormat(game text bottom, consulte); --> Too to TextBigAllFormat but in bottom
  MsgPMFormatEx(playerid, colour, text, game text);  --> Example:  MsgPMFormatEx(playerid, colour, "Hello!", "Hello");
  MsgAllFormatEx(colour,text,game text); --> Example: MsgAllFormatEx(colour, "hello all", "hello all");
  Among others ...

- Consulte model name of vehicle, but for this, need add vehicles first:

  AddVehicleServer(vehicleid, model, x, y, z, angle,colour1 ,colour2); <-- Need add vehicles in your server with that.
  GetVehicleModelID(vehicleid); <-- With this consulte  modelid of vehicleid.
  GetVehicleModelName(modelid); <-- With this consulte model name of modelid, exmaple: GetVehicleModeName(GetVehicleModelID(vehicleid));

- Consulte time server.
 
  GetTimeData() --> Result to use this function  "12:35 PM"
  GetDayDataFormat() -- > Result to use this function  "19/March/2011"
  GetDayData() --> Result to use this function "March 19, 2011"

- Consulte skin name.

  GetNameFromSkinID(skinid)

- Consulte modelid of pickupid, but for this, need add pickups first:

 AddPickupServer(pickupid, modelid, x, y, z)
 GetPickupModelID(pickupid) <-- Consulte Model ID From pickupid

- And a randplayer to selection a player.
 
  RandPlayer() <-- player selects a random server all

Among other utilities you can use in your server.

I hope you see, and for any questions or suggestions, please comment.

Credits: YO ( Madara ).

Greetings. ;)
#39
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 19, 2011, 06:46:33 PM
AAA, sorry, is my include, later upload.
I'm having lunch ;D
#40
Many ask, how to make a LMS for my server?, well, here I show you a way to haer a man last Stading created by me.

First of all, define the locations used in the game last man standing, it will stop positions, but they better save their time and give them that I have.
new Float:RandInfoLMS[15][7] = { // MinX, MaxX, MinY, MaxY , X , Y , Z , Int
{-1102.2737,-1075.0229,1267.8066,1393.5516,-1094.28332519, 1307.67419433, 34.24106979},
{-1708.7883, -1540.6664, -524.5789, -463.3878, -1635.2369, -501.1630, 50.1828},
{-1013.4427, -924.8788, 698.5222, 777.5504, -969.2894, 743.3184, 57.2507},
{-833.6387, -754.4878, 806.6534, 855.1415, -804.1165, 815.6527, 11.0846},
{542.0474, 590.8376, -110.5802, -70.8055, 568.1187, -84.2334, 9.4397},
{91.7778, 167.5648, 329.0602, 357.0180, 128.2160, 343.1032, 19.1541},
{-44.6020, -27.4109, 1178.2372, 1213.4877, -37.6370, 1197.8688, 21.4526},
{-1200.9607, -1167.4662, -1349.8386, -1312.9932, -1183.3875, -1334.0931, 14.9360},
{-1107.7136, -1057.4801, -288.9542, -239.3820, -1081.9669, -262.2973, 20.4579},
{-1107.7972, -1069.2410, -634.8514, -594.0654, -1090.0913, -616.2128, 11.2534},
{-1003.6110, -955.4279, 96.3539, 142.3303, -978.6742, 119.9475, 9.2628},
{-998.5562, -902.6942, 369.7229, 427.0913, -954.6682, 397.8014, 11.2516},
{196.3628, 236.3812, -1297.0651, -1252.8628, 230.3235, -1266.7476, 20.1141},
{98.4118, 135.2352, -1340.5229, -1308.0060, 121.8333, -1328.8723, 4.4396},
{-18.8285, 27.5851, -949.9951, -927.9282, 4.2093, -941.0284, 16.1160}
};


Then we define another to be the same, but this will be the reward it received the game winner last man standing:
new RandRewardLMS[10][1] = {
{500},
{1500},
{3000},
{4500},
{6000},
{7500},
{9000},
{12500},
{16000},
{25000}
};


Now we will create two stored data enumerators, one will be to define a player, and other free information that will serve to guard the last man standing ticket:

enum LMSInfo
{
OnLMS,
LockLMS,
CountLMS,
Float:MinXS,
Float:MaxXS,
Float:MinYS,
Float:MaxYS,
Float:PosXS,
Float:PosYS,
Float:PosZS,
IntS,
RewS,
CDLMS,
WinnerS[256],
}

//And this:

enum playerInfoLMS
{
JoinLMS,
Float:pX,
Float:pY,
Float:pZ,
       LastVehicle,
}


Once employed these, we place the new letters that are combined with the enumeration of these two mentioned, remember, all this must go up:

new pInfoLMS[MAX_PLAYERS][playerInfoLMS];
new gLMS[LMSInfo], MSGLMS[256], LMS1;


After that, look for the "public OnPlayerDisconnect (playerid, reason)" and put it in an empty line, which can be used so that when a player leaves the server, and the full play the last man standing, you remove the ticket and decrease the number of players in the last man standing:

public OnPlayerDisconnect(playerid, reason)
{
       if (pInfoLMS[playerid][JoinLMS] == 1) {pInfoLMS[playerid][JoinLMS] = 0; DecLMSCount(1);}
return 1;
}


Now create the script! lms and! more besides join a checker who are playing the last man standing and how many are:

public OnPlayerText(playerid, cmdtext[])
{

   if (strcmp(cmd, "!lms", true) == 0) {
if(gLMS[OnLMS] == 1) SendClientMessage(playerid, 0x04A36BFF,"[Error] - Last Man Standing currently activated.");
else {
                    StarLMS();
}
return 1;
   }

   else if (strcmp(cmd, "!join", true) == 0) {
if(gLMS[OnLMS] == 0) SendClientMessage(playerid, 0x04A36BFF,"[Error] - Last Man Standing currently disabled.");
else if(pInfoLMS[playerid][JoinLMS] == 1) SendClientMessage(playerid, 0x04A36BFF,"[Error] - You are already in Last Man Standing.");
else if(gLMS[LockLMS] == 1) SendClientMessage(playerid, 0x04A36BFF,"[Error] - You can't enter the Last Man Standing.");
else {
    JoinPlayerLMS(playerid);
}
return 1;
   }

   else if (strcmp(cmd, "!playerslms", true) == 0) {
       new Count, i;
       for (i = 0; i <= MAX_PLAYERS; i ++) if(IsPlayerConnected(i) && pInfoLMS[i][JoinLMS] == 1) Count++;
       if (Count >= 1) {
                new bool:b = false;
                for (i = 0; i <= MAX_PLAYERS; i ++) if(IsPlayerConnected(i) && pInfoLMS[i][JoinLMS] == 1) {
                if(!b) {format(MSGLMS,256,"%s",PlayerName(i)); b = true;}
                else format(MSGLMS,256,"%s - %s",MSGLMS,PlayerName(i));
                }
}
if (Count >= 1) {format(MSGLMS,256, "Players in LMS: %s.",MSGLMS); SendClientMessageToAll(0x377DFFFF,MSGLMS); format(MSGLMS, 256, "Total players LMS: %d.",GetLMSCount()); SendClientMessageToAll(0x377DFFFF,MSGLMS);}
else SendClientMessageToAll(0x377DFFFF, "No players currently in LMS.");
return 1;
   }

   return 0;
}


Then we move into the public "OnPlayerDeath (playerid, killerid, reason, bodypart)," that there will a line when a player dies it decreases the number of players in lms and you take your ticket you have in combat:

public OnPlayerDeath(playerid, killerid, reason, bodypart)
{        
     if ( reason == reason ) {
         if (pInfoLMS[playerid][JoinLMS] == 1) {pInfoLMS[playerid][JoinLMS] = 0; DecLMSCount(1);}
     }
     return 1;
}


If you noticed, in the above commands:! lms and! join, there are two functions that are JoinPlayerLMS StarLMS and the first is to create all the data using defined at the outset, filled out the location of the combat and reward, and the second is to fill in data when active player! join and enter the battle, but the weapon is removed and temporarily frozen, remember that when they do new function using "public ", define the way down and without intervention from others.

public StarLMS()
{
   new rand1 = random(sizeof(RandInfoLMS)), rand2 = random(sizeof(RandRewardLMS));
   new Float:x, Float:y, Float:z, Float:MinX, Float:MaxX, Float:MinY, Float:MaxY;
   MinX = RandInfoLMS[rand1][0],MaxX = RandInfoLMS[rand1][1],MinY = RandInfoLMS[rand1][2],MaxY = RandInfoLMS[rand1][3];
   x = RandInfoLMS[rand1][4],y = RandInfoLMS[rand1][5],z = RandInfoLMS[rand1][6];
   gLMS[MinXS] = MinX, gLMS[MaxXS] = MaxX, gLMS[MinYS] = MinY, gLMS[MaxYS] = MaxY;
   gLMS[PosXS] = x, gLMS[PosYS] = y, gLMS[PosZS] = z, gLMS[RewS] = RandRewardLMS[rand2][0], gLMS[OnLMS] = 1;
   SetTimer("CloseJoinLMS",20000,0);
   SendClientMessageToAll(0x377DFFFF,"LMS Activate, type !join to enter, wait players [20 Seg.]");
   return 1;
}

public JoinPlayerLMS(playerid)
{
   new Float:x, Float:y, Float:z;
   SendClientMessage(playerid, 0x04A36BFF,"Joined to Last Man Standing, waiting more players...");
   GetPlayerPos(playerid,x,y,z);
   IncLMSCount(1);
   TogglePlayerControllable(playerid,0);
   ResetPlayerWeapons(playerid);
   format(MSGLMS,256,"%s",PlayerName(playerid));
   pInfoLMS[playerid][pX] = x, pInfoLMS[playerid][pY] = y, pInfoLMS[playerid][pZ] = z;
   pInfoLMS[playerid][JoinLMS] = 1;
   SetPlayerPos(playerid,gLMS[PosXS], gLMS[PosYS], gLMS[PosZS], 0,0);
   if (IsPlayerInAnyVehicle(playerid)) pInfoLMS[playerid][LastVehicle] = GetPlayerVehicleID(playerid);
   return 1;
}


Now add this as a timer function that the StarLMS, which closes the entrance to the LMS and deny entry to those who want to go putting! join, and also send the countdown to begin the fight:

public CloseJoinLMS()
{
   if (gLMS[CountLMS] == 0) {SendClientMessageToAll(0x377DFFFF, "LMS has closed because no players."); SetTimer("QuitBugLMS",1000,0);}
   if (gLMS[CountLMS] == 1) {SendClientMessageToAll(0x377DFFFF, "LMS has closed because need more players."); QuitPlayerLMS();}
   else if (gLMS[CountLMS] >= 2) {
                SendClientMessageToAll(0x377DFFFF, "LMS is now closed, you can't get at moment.");
                SendClientMessageToAll(0x377DFFFF, "Starting the game Last Man Standing.");
gLMS[LockLMS] = 1;
        SetTimer("CountLMS1", 1000, 0);
SetTimer("CountLMS2", 2000, 0);
  SetTimer("CountLMS3", 3000, 0);
SetTimer("CountLMS4", 4000, 0);
   }
   return 1;
}




public StarGameLMS()
{
   if (gLMS[CountLMS] == 0) {SendClientMessageToAll(0x377DFFFF, "LMS has ended because no players."); KillTimer(LMS1); SetTimer("QuitBugLMS",1000,0);}
   else if (gLMS[CountLMS] == 1) {SendClientMessageToAll(0x377DFFFF, "LMS has completed and a winner."); KillTimer(LMS1); SetTimer("InfoPlayerWinLMS",500,0); SetTimer("SendPlayerRewardLMS",1000,0);}
   else if (gLMS[CountLMS] >= 2) {
        for(new i = 0; i <= MAX_PLAYERS; i++) {
            new plr = FindPlayerIDFromString(PlayerName(i));
            if(pInfoLMS[plr][JoinLMS] == 1){
               if(!NeedPlayerInArea(plr,gLMS[MinXS],gLMS[MaxXS],gLMS[MinYS],gLMS[MaxYS])) {SetPlayerPos(plr,gLMS[PosXS], gLMS[PosYS], gLMS[PosZS], 0,0); GameTextForPlayerBottom(plr,"~h~re-join!");}
               else GameTextForPlayerBottom(plr,"\x10");
            }
}
}
return 1;
}




public QuitPlayerLMS()
{
   SetTimer("QuitBugLMS",2000,0);
   for(new i = 0; i <= MAX_PLAYERS; i++) {
       new plr = FindPlayerIDFromString(PlayerName(i));
       if(pInfoLMS[plr][JoinLMS] == 1){
          gLMS[LockLMS] = 0, gLMS[OnLMS] = 0, pInfoLMS[plr][JoinLMS] = 0;
          TogglePlayerControllable(plr,1);
          SetPlayerWeapon(plr,19,9999);
      SetPlayerWeapon(plr,22,9999);
      SetPlayerWeapon(plr,32,9999);
      DecLMSCount(1);
      if (pInfoLMS[plr][LastVehicle] >= 1) {PutDirectlyInVehicle(plr,pInfoLMS[plr][LastVehicle]); pInfoLMS[plr][LastVehicle] = 0;}
      else SetPlayerPos(plr,pInfoLMS[plr][pX],pInfoLMS[plr][pY],pInfoLMS[plr][pZ],0,0);
       }
   }
   return 1;
}




public QuitBugLMS()
{
   gLMS[LockLMS] = 0;
   gLMS[OnLMS] = 0;
   gLMS[CountLMS] = 0;
}



public InfoPlayerWinLMS()
{
   gLMS[LockLMS] = 0, gLMS[OnLMS] = 0, gLMS[CountLMS] = 0;
   for(new i = 0; i <= MAX_PLAYERS; i++) {
       new plr = FindPlayerIDFromString(PlayerName(i));
       if(pInfoLMS[plr][JoinLMS] == 1){
  format(MSGLMS,256,"%s",PlayerName(plr));
          gLMS[WinnerS] = MSGLMS;
          }
   }
   return 1;
}





public SendPlayerRewardLMS()
{
   new plr = FindPlayerIDFromString(gLMS[WinnerS]);
   format(MSGLMS,256,"~h~ LMS winner: ~o~%s",PlayerName(plr));
   GameTextForAll(MSGLMS);
   format(MSGLMS,256, "%s is the winner of LMS, Reward:$ %d.",PlayerName(plr),gLMS[RewS]);
   SendClientMessageToAll(0x377DFFFF,MSGLMS);
   GivePlayerMoney(plr,gLMS[RewS]); // <--- Here put u cash or type function use to send money player
   SetPlayerWeapon(plr,15,9999);
   SetPlayerWeapon(plr,17,9999);
   SetPlayerWeapon(plr,29,9999);
   SetPlayerPos(plr,pInfoLMS[plr][pX],pInfoLMS[plr][pY],pInfoLMS[plr][pZ],0,0);
   pInfoLMS[plr][JoinLMS] = 0;
SetTimer("QuitBugLMS",1000,0);
if (pInfoLMS[plr][LastVehicle] >= 1) {PutDirectlyInVehicle(plr,pInfoLMS[plr][LastVehicle]); pInfoLMS[plr][LastVehicle] = 0;}
else SetPlayerPos(plr,pInfoLMS[plr][pX],pInfoLMS[plr][pY],pInfoLMS[plr][pZ],0,0);
}





public CountLMS1()
{
   for(new i = 0; i <= MAX_PLAYERS; i++) {
   new plr = FindPlayerIDFromString(PlayerName(i));
   if(pInfoLMS[plr][JoinLMS] == 1){
  GameTextForPlayer(plr,"~b~-~y~ 3 ~b~-");
 }
  }
  return 1;
}

public CountLMS2()
{
   for(new i = 0; i <= MAX_PLAYERS; i++) {
   new plr = FindPlayerIDFromString(PlayerName(i));
   if(pInfoLMS[plr][JoinLMS] == 1){
  GameTextForPlayer(plr,"~b~-~x~ 2 ~b~-");
 }
  }
  return 1;
}

public CountLMS3()
{
   for(new i = 0; i <= MAX_PLAYERS; i++) {
   new plr = FindPlayerIDFromString(PlayerName(i));
   if(pInfoLMS[plr][JoinLMS] == 1){
  GameTextForPlayer(plr,"~b~-~h~ 1 ~b~-");
 }
  }
  return 1;
}

public CountLMS4()
{
   LMS1 = SetTimer("StarGameLMS",1000,1);
   for(new i = 0; i <= MAX_PLAYERS; i++) {
   
   new plr = FindPlayerIDFromString(PlayerName(i));
   if(pInfoLMS[i][JoinLMS] == 1){
         GameTextForPlayer(plr,"~b~- ~o~Go! Go! Go! ~b~-");
         SetPlayerWeapon(plr,21,9999);
         SetPlayerWeapon(plr,23,9999);
         SetPlayerWeapon(plr,32,9999);
         SetPlayerHealth(plr,100.0);
         TogglePlayerControllable(plr,1);
         }
}
return 1;
}




public GetLMSCount()
{
return gLMS[CountLMS];
}

public IncLMSCount(amount)
{
gLMS[CountLMS] = gLMS[CountLMS] + amount;
}

public DecLMSCount(amount)
{
gLMS[CountLMS] = gLMS[CountLMS] - amount;
}





stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
      GetPlayerPos(playerid, x, y, z);
      if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
      else return 0;
      return 1;
}


And define this function, if not existe:

stock PlayerName(playerid)
{
     new name[24];
     GetPlayerName(playerid,name,24);
     return name;
}


    - OPTION 2 -
If they fail to put the codes right into your script, you can choose to lower my filterscript and add it to your server.

This filterscript filterscripts put it in the folder (if any) and if there add it, then you put in your server.cfg that is where your server, and inside it, add a line (if there) and named filterscripts below this the filter name "LMS".

   DOWNLOAD:Filterscript LMS to Mediafire  &&  Filterscript LMS to Megaupload

And that's all, for any questions or suggestions, let me know and we will gladly assist you.

Credits: YO ( Madara ).
MSN: [email protected]

Greetings. :D
#41
ShowRoom (pawn) / Re: Speedometer by Madara
March 18, 2011, 11:41:37 PM
Quote from: BIG[H] on March 18, 2011, 09:05:30 AM
Copy Cats :P

Quotehttp://www.gtamscripting.info/index.php?topic=80.msg675#msg675

That function is done on SAMP forums, that's why I put in credits: Credits: I (Madara) + SAMP. "that releases it to function in vcmp, or not read?

sseebbyy:
Check this out as I put it, because mine does not give errors, If the error persists, then contact me at my msn [email protected].
#42
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 18, 2011, 11:33:13 PM
I uploaded the file .PWN of my server, i was busy this morning not to upload it to this very day, and i did not permit anyone to publish before the file .PWN
#43
ShowRoom (pawn) / Re: Speedometer by Madara
March 18, 2011, 08:14:06 AM
By the way,i speak more spanish than english
#44
ShowRoom (pawn) / Speedometer by Madara
March 18, 2011, 05:05:14 AM
Hi all, here again up more code and utilities for use by their server, well this time I teach how to make the speedometer for vehicles (obio), well, begin.

To begin with we will create a numbering system, this type of system stores numbers, text or decimal numbers on a player, as this will use it to the speedometer and places it on top of our GM or where there are more of these. And is created if:

enum playerToSpeedo
{
   Speedo,
   SpeedoAct,
   Float:LastX,
   Float:LastY,
   Float:LastZ,
}


After that, you must create a new word which will be used this system along with the player that is building up the same, this will put it where it is located the other "new", but example "new gPlayers[MAX_PLAYERS][MAX_PLAYERS_NAME+1];. And it would be something if:

new Speedometer[MAX_PLAYERS][playerToSpeedo];

Now, we move into the "public OnPlayerDisconnect (playerid, reason)" and add this line to serve so that when a player leaves the server (for any reason), if he was in a car, you remove the ticket value "true", it does show you the speedometer of your vehicle. and is created is:

public OnPlayerDisconnect(playerid, reason)
{    
   if(Speedometer[playerid][Speedo] == 1) Speedometer[playerid][Speedo] = 0;
   return 1;
}


After that, we move into the "public OnPlayerEnterVehicle (playerid, vehicles, ispassenger)", there arem also the same as what we made in public before, but this time with the ticket if your speedometer is on, this is so when the player enters the vehicle, the speedometer will check if he has his kph on, and if you send your speedometer. And it would be more or less if:

public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
   if(Speedometer[playerid][Speedo] == 0 && Speedometer[playerid][SpeedoAct] == 0) Speedometer[playerid][Speedo] = 1;
   return 1;
}


Likewise, we will do the same in the "public OnPlayerExitVehicle (playerid, vehicle), but this time it will remove the ticket of" true "to get your speedometer while not in the vehicle, and if you avoid mistakes. We will make it if:

public OnPlayerExitVehicle(playerid, vehicleid)
{
   if (Speedometer[playerid][Speedo] == 1) {Speedometer[playerid][Speedo] = 0; GameTextForPlayerBottom(playerid,"\x10");}
   return 1;
}


Now create the command to ask if they want their kph is displayed or not. And places it in either "public", where you put the commands, but for any confusion, we will put an example in the "public OnPlayerText (playerid, cmdtext [])":

public OnPlayerText(playerid, cmdtext[])
{
if (strcmp(cmd, "!kph", true) == 0) {
       new MSN[256]; tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) {format(MSN, 256,"[Syntax] - The correct use: %s <on/off>",cmdtext); SendClientMessage(playerid, 0x04A36BFF, MSN);}
else {
     if (strcmp(tmp, "on", true) == 0) {
 if (Speedometer[playerid][SpeedoAct] == 0) SendClientMessage(playerid, 0x04A36BFF,"[Error] - You have are already KpH turned ON.");
 else {
Speedometer[playerid][SpeedoAct] = 0;
SendClientMessage(playerid, 0x04A36BFF,"KpH turned ON.");
if(IsPlayerInAnyVehicle(playerid)) Speedometer[playerid][Speedo] = 1;
}
      }
              else if (strcmp(tmp, "off", true) == 0) {
  if (Speedometer[playerid][SpeedoAct] == 1) SendClientMessage(playerid, 0x04A36BFF,"[Error] - You have are already KpH turned OFF.");
  else {
Speedometer[playerid][SpeedoAct] = 1;
SendClientMessage(playerid, 0x04A36BFF,"KpH turned OFF.");
if(IsPlayerInAnyVehicle(playerid)) {Speedometer[playerid][Speedo] = 0; GameTextForPlayerBottom(playerid,"\x10");}
}
          }
 else SendClientMessage(playerid, 0x04A36BFF,"[Syntax] - The correct use: !kph <on/off>");
    }
    return 1;
      }

      return 0;
}


PD:If you do not have tmp defined, define it as if they have the function strtok

Now, place a timer that causes the "speedo" remain active on the server, we first started putting it in the "public OnGameModeInit ()":

public OnGameModeInit()
{
SetTimer("SpeedoVehicle",500,1);
       return 1;
}


And finally we will create this function we put in the timer, this function is the process done to take out the distance traveled by a vehicle, more than anything, this function takes the positions you have with the latter having, by the way to qui system will use texts that are "LastX, LastY, LastZ" as if by the same coordinate multipilcarlas divided into 2, and added the three after having taken each of the coordinates, and will use its value to mutiplicarlos then the speed way to display the numbers:

public SpeedoVehicle()
{
new Float:x, Float:y, Float:z, Float:distance, MSN[256];
   for(new i = 0; i <= MAX_PLAYERS; i++) {
   new plrv = FindPlayerIDFromString(gPlayers[i]);

   if (Speedometer[i][Speedo] == 1 && IsPlayerConnected(i) && IsPlayerInAnyVehicle(i)) {
   GetPlayerPos(plrv, x, y, z);
   distance = floatsqroot(floatpower(floatabs(floatsub(x,Speedometer[plrv][LastX])),2)+floatpower(floatabs(floatsub(y,Speedometer[plrv][LastY])),2)+floatpower(floatabs(floatsub(z,Speedometer[plrv][LastZ])),2));
            Speedometer[plrv][LastX] = x;
            Speedometer[plrv][LastY] = y;
        Speedometer[plrv][LastZ] = z;
       format(MSN, sizeof(MSN), "~x~KpH: ~h~ %d",floatround(floatmul(distance,3.2)));
       GameTextForPlayerBottom(plrv,MSN);
   }
  }
  return 1;
}


Well, with this finish a speedometer for our server, I hope you like it and one more thing, if it has "FindPlayerIDFromString (agregenla [])", tag on your server, also the " strtok (cmdtext, idx) "but if you already have, not add it.

Credits: YO ( Madara ) + SAMP.

Greetings. :D
#45
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 18, 2011, 03:02:51 AM
I see many walk decompiled my server, my question is, can not wait until Friday?, truth is that I'm going to put the Friday before boarding reason codes and special commands such as: spawnallv, anti-spam / flooding, speedometer, system ban to armour, command hunt, game last man stading, banneds system, etc ... including a function to save two lines when writing messages with queries, eg

 new MSN[256];
 format (MSN, 256, "The player% s bla bla bla", PlayerName (playerid));
 SendClientMessageToAll (BLUE, MSN)


That is another function that I made:

  MessageAllFormat (BLUE, "The player% s bla bla bla", PlayerName (playerid));

But hey, I can not upload all for work and school issues, but well, there's no tomorrow I'll upload the file .PWN, maybe the early morning today (time mexico)