• 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

#46
ShowRoom (pawn) / Re: Simple Jail System !
March 18, 2011, 02:36:41 AM
Nice work!! :D
Greetings ;)
#47
Si quieres, pasa por mi post donde explico como hacer uno, si no le llegaras a entender, puedes pasarme tu GM y yo se lo pondre.

http://forum.vicecitymultiplayer.com/index.php?topic=2540.0

Greetings  ;)
#48
Many are wondering how to make an anti-spam on your server, as a way of doing here with this little code, and i will show two different ways.

- FIRST FORM -

First of all, need to define a couple of words that will serve to check how many messages are sent through time, this must go down where are the lines #include.
And it is if:
#define LIMIT_REP_SPAM     3
#define MSNxSEC    1750


Now, will make new words, which define a word representing the player, whether as the gPlayers[playerid], but this time would be two, one for each message, and another post player, this must go down where all the define. And it would to if:

new MSNCount[MAX_PLAYERS];
new MSNPlayer[MAX_PLAYERS];


After that, they will put this little code that has sent the message by time, and located below the public OnPlayerText (playerid, cmdtext[]). And I would put sii:

public OnPlayerText(playerid, cmdtext[])
{

   new MSN[256],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) {
       format(MSN,256,">> Auto-Kick %s, ID %d, Reason: [ No Spam/Flooding ].", PlayerName(playerid), playerid);
       SendClientMessageToAll(0x377DFFFF,MSN);
       Kick(playerid);
return 1;
   }
   
 return 0;
}


This will get to kick players who send mass messages, and finally create the function that refers to the player's name:

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


Now this kind of anti-spam is for those who send messages fast but with lyrics changed, but now, so those who send the same message, but slower than the time it gets a bit annoying, because here they teach the second form:

- SECOND FORM -

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

enum playerToSpamm
{
   CountText,
   LastText[256],
}


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 Spamming[MAX_PLAYERS][playerToSpamm];

Now, we move into the public OnPlayerText (playerid, cmdtext []);, and paste this line function of spamm:

public OnPlayerText(playerid, cmdtext[])
{
   PlayerSpamming(playerid,cmd,cmdtext);
   return 0;
}


And define that function down you GM, look:

public PlayerSpamming(playerid,cmd[],cmdtext[])
{
   if (strcmp(cmd, cmd, true) == 0) {
      if (strcmp(cmdtext, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) {format(MSN,256,">> Auto-Kick %s, ID %d, Reason: [ SPAMMING ].", PlayerName(playerid), playerid); SendClientMessageToAll(0x377DFFFF,MSN); Kick(playerid);}
      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 with that we will have a kick by the same player to send messages over time.

By the way, I passed, in the "public OnPlayerDisconnect (playerid, reason), put it in an empty line:
public OnPlayerDisconnect(playerid, reason)
{
Spamming[playerid][CountText] = 0; // this in an empty line
return 1;
}


Well I hope you like it and comment if you have doubts, these codgis the job I did and I have different servers (including the one that got on this forum) and serves 100%, if they can not put it in your GM, and contacts to help me to put it.

     - 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 filterscripts put it in the folder filterscript (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 Anti-Spam to Mediafire  &&  Filterscript Anti-Spam to Megaupload

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

Credits: YO ( Madara ).

Greetings  ;)

PD: Sorry for my bad English :-\
#49
tato no, will ask you no longer say that, it makes me look moody or something. :-\
#50
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 15, 2011, 11:36:15 PM
True, because i thought that in the SAMP forums is a decompiler .AMX, but core to the last time it served no use, who knows now.
#51
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 15, 2011, 08:34:46 AM
Thx, now... ::)
For some reasons and motives have not put the file .PWN, but do not worry, I'll post later.
I hope to understand and be patient, and if they ask, how long to wait?, I would say counting since I uploaded the server, 3 days more (no later than Friday). :)

For uploading the file if you upload to see and to change or translate, and esprando to not remove the credits.

Greetings all. :D
#52
Hi all, i come today to teach (for those who do not know) how to create the command "spawnallv" where all vehicles spawn in the game.

First of all, download this. ini which brings necessary information for that command.

  Folder to use in scriptfiles.

Put the folder in the folder scriptfiles vehicles (if the folder existing vehicles, just hanging separation.ini) and go to GM to put this command.

This command anger in the public OnPlayerCommandText8playerid, cmdtext)
public OnPlayerCommandText(playerid, cmdtext)
{
/*Below where the public begins OnPlayerCommandText (playerid, cmdtext)
define this:*/
      new Float:x, Float:y, Float:z; // If not exist, put that.
      new MSN[256]; // If not exist, put that.

      else if (strcmp(cmd, "spawnallv", true) == 0) {
// Here you put what you want, is to lock the command to members or need to spawn.
else {
 format(MSN,256, "Admin %s spawn all vehicles, Activated!", PlayerName(playerid));
                         SendClientMessageToAll(BLUE,MSN);
                         for(new v = 1; v <= NUMBERS; v++) {// <- depending on the vehicle you have on your server, put the number in that part.
                         new separation = dini_Int("/Vehicles/Separation.ini", IntToStr(v));
 GetPlayerPos(playerid, x, y, z);
 SetVehiclePos(v, x+10.0000, y+10.0000, z +separation, 0);
 }
   }
   return 1;
}

else if (strcmp(cmd, "delspawnallv", true) == 0) {
// Here you put what you want, is to lock the command to members or need to spawn.
else {
 format(MSN,256, "Admin %s delate and respawned all vehicles!", PlayerName(playerid));
                         SendClientMessageToAll(BLUE,MSN);  
                         for(new v = 1; v <= NUMBERS; v++) {// <- depending on the vehicle you have on your server, put the number in that part.
 SetVehicleToRespawn(v);
 }
   }
   return 1;
}

  return 0;
}


Define this function, if not exist:

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


And ready, to test your command on the server.

I hope you liked it, then I'll post more stuff. If there is any doubt or question, make me know. If they do not fit or gives error, please tell me, I've already tried this command on my server, and I have put another, and if it works.

Credits: YO ( Madara ).

Greetings. :D
#53
ShowRoom (pawn) / Re: Warchiefs v1.0 by Madara
March 14, 2011, 10:12:05 PM
Sorry, i fixed the error, i have uploaded to the server again, this time must serve well. :P
Links are up. ::)
#54
Hi all, well today I come bringing a server free of charge, to which his name as shown in the title is WarChiefs v1.0 created by me ... although the gm will only have the ".AMX", later i will put ".PWN" to be edited.

-Server Warchiefs v1.0 -

   Author Name: Madara
   Created: 10th March 2011
   Uploaded: 14th March 2011 ( Warchiefs v1.0 ) with .PWN uploaded.
   Email: [email protected]
   Country: Mexico
   Credits: Yo ( Madara )
   Credits to Plugins: DracoBlue (plugins:include; dini, dutils, dudb, etc...)

   Download: Warchiefs v1.0 to Mediafire & Warchiefs v1.0 to Megaupload (Fixed)




Well, now i will mention the existing commands on the server:

/c register
/c login
/c cash
/c stats
/c deposit
/c withdraw
/c givecash
/c newpassword
/c level
/c data
/c infp

/c admins
/c ping
/c wep
/c goto
/c nogoto
/c hide
/c changeskin
/c hp
/c heal
/c skin
/c info
/c scripts
/c spree
/c myspree
/c rules
/c disarm
/c addquote
/c quote
/c cd
/c drunk
/c undrunk
/c wstats
/c randspawn
/c hunt
/c hunted
/c bstats
/c lms
/c playerslms
/c time
/c credits

/c buycar
/c sellcar
/c sharecar
/c desharecar
/c mycars
/c mysharecars
/c getcar
/c repair
/c renamecar
/c lockcar
/c gotov
/c eject
/c kph

/c buyprop
/c sellprop
/c shareprop
/c deshareprop
/c myprops
/c myshareprops
/c renameprop
/c propspawn
/c home


Admin Commands:

Moderator:
/c ann
/c pmann
/c get
/c setdrunk
/c setwep
/c setskin


Admin:
/c ban
/c kick
/c wepall
/c sethide
/c setloc
/c gotolocall
/c getall
/c healall
/c setspikes
/c ann
/c pmann
/c get
/c setdrunk
/c setwep
/c setspeed
/c setgrav
/c setwlevel
/c drunkall
/c quitarmall
/c undrunkall
/c get
/c setdrunk
/c setwep


Management:
/c setmon
/c setlevel
/c flycars
/c fastswitch
/c jumpswitch
/c setdriveby
/c shotinair
/c sethp
/c setarm
/c stuntbike
/c sethpv
/c putplayer
/c setkills
/c setdeaths
/c setpassword
/c kickall
/c freezeall
/c unfreezeall
/c killall
/c armall
/c unban
/c setcar
/c spawnallv
/c delspawnallv


In the folder "Configserver" located in "scriptfiles" there you can change the server name when you enter and set the rules of the server


And those are all the commands, well, I hope you like this server that I brought and contribution to all of you enjoy the server.

Any questions or suggestions you can tell me, also precent report errors on the server and immediately will help you.

IMPORTANT: The alteration of the script and create future errors will have no technical support, and removing the credits would cause a very severe decision of the operator, for example: no more versions or get much less help and technical support.

#55
ShowRoom (pawn) / Re: System Banneds to Pawno
March 12, 2011, 02:49:14 AM
How?, you are Terminatorupgrade2 ???... and now are BIG[H] ??? ??
#56
ShowRoom (pawn) / System Banneds by Madara
March 11, 2011, 06:14:02 AM
First download this link:http://www.mediafire.com/?jnr27599hribuio, brings in a folder that says "Banneds" you put that folder in the folder "scriptfiles" (if you do not, create it). and paste these 4 functions in your "GameMode":

public InfoPlayerBanned(playerid)
{
new IP[256],MSN[256],BAN;
GetPlayerIp(playerid,IP,256);
BAN = dini_Int("/Banneds/Banlist.ini",IP);//find IP in the list.
if(BAN == 1){// if the IP in the list is 1, kick player (1 = true, 0 = false)
           format(MSN,256,">> Server Auto-Kick: %s - Reason: [IP Banned]",PlayerName(playerid));
           SendClientMessageToAll(0x377DFFFF,MSN);
           Kick(playerid);//kick player :P
                   }
}

public PlayerBanIP(playerid,admin,reason[])
{
       new IP[256],MSN[256],inf[256];
       GetPlayerIp(playerid,IP,256);
       format(inf,256,"1 %s %s %s",PlayerName(playerid),PlayerName(admin),reason);//info to archive player banned
       dini_Set("/Banneds/Banlist.ini",IP,inf);//send to ban list
       dini_Set("/Banneds/PlayerBanlist.ini",gPlayers[playerid],IP);//send to player and IP
       format(MSN,256,">> Admin %s Banned: %s, ID: %d, Reason:%s",gPlayers[admin],gPlayers[playerid],playerid,reason);
       SendClientMessageToAll(0x377DFFFF,MSN);
       Kick(playerid);//kick player xP
}

public PlayerUnBanIP(player[],admin,reason[])
{
new MSN[256],IP[256],param[2][128];
IP = dini_Get("/Banneds/PlayerBanlist.ini",player);
       split(dini_Get("/Banneds/Banlist.ini",IP), param, ' ');
       format(MSN,256,">> Admin %s Un-Banned: %s, Reason:%s",PlayerName(admin),param[1],reason);
       SendClientMessageToAll(0x377DFFFF,MSN);
       dini_Unset("/Banneds/Banlist.ini",IP);//remove IP banned the list
       dini_Unset("/Banneds/PlayerBanlist.ini",player);//remove the name list
}

public IsPlayerBanned(player[])
{
new ispb[256];
ispb = dini_Get("/Banneds/PlayerBanlist.ini",player);//find IP to check list banneds
return (strcmp(ispb, "0", true) == 0) ? false : true;//checks the existence of the player or not
}


Now, in function "public OnPlayerConnect (playerid)," hit this InfoPlayerBanned (playerid), which would be more or less if:

public OnPlayerConnect(playerid)
{
InfoPlayerBanned(playerid);
return 1;
}


Now paste these 2 commands in function "public OnPlayerCommandText (playerid, cmdtext [])":

   else if (strcmp(cmd, "ban", true) == 0) {
new plr,reason[256];
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), reason = strtok(cmdtext, idx);
if (!strlen(reason)) SendClientMessage(playerid,0x04A36BFF,"** pm >> [Syntax] - The correct use: /c ban <player> <reason>");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,0x04A36BFF,"** pm >> [Error] - Unknown player.");
else {
                PlayerBanIP(plr,playerid,cmdtext[strval(reason)+strlen(tmp)+4]);
}
return 1;
    }

   else if (strcmp(cmd, "unban", true) == 0) {
new reason[256];
tmp = strtok(cmdtext, idx), reason = strtok(cmdtext, idx);
if (!strlen(reason)) SendClientMessage(playerid,0x04A36BFF,"** pm >> [Syntax] - The correct use: /c unban <player> <reason>");
  else if (!IsPlayerBanned(tmp)) SendClientMessage(playerid,0x04A36BFF,"** pm >> [Error] - This player is't banned, insert full name.");
else {
               PlayerUnBanIP(tmp,playerid,cmdtext[strval(reason)+strlen(tmp)+6]);
}
return 1;
    }


And define this function, if not exist:

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


All these are functions that are used to see a player banned and check if it exists in the list.

Credits: YO ( Madara ).

Greetings ;)
#57
Bueno, aqui te va la funcion setskin, eso si es que aun no la tienes:

public OnPlayerCommandText(playerid, cmdtext[])
{
       new cmd[256], idx;              
       cmd = strtok(cmdtext, idx);

       else if (strcmp(cmd, "setskin", true) == 0) {
               new arg[256], sk[256], p[256];
       arg = strtok(cmdtext, idx), sk = strtok(cmdtext, idx), p = FindPlayerIDFromString(arg);
if (!strlen(sk)) SendClientMessage(playerid,colour, "[Syntax] - The correct use: /c setskin <playerid/name> <skinid>.");
else {
    if (p == 255) SendClientMessage(playerid,colour,"[Error] - Unknown player.");
    else if (!IsNumeric(sk)) SendClientMessage(playerid,colour,"[Error] - Invalid Skin, type numbers to skin.");
    else {
                               new player1[24], player2[24],MSN[256];
                               GetPlayerName(playerid,player1,24);
                               GetPlayerName(p,player2,24);
               format(MSN,256,"Admin %s set skin %d to: %s.",player1,strval(sk),player2);
                               SendClientMessageToAll(colour,MSN);
       SetPlayerSkin(p,strval(sk));
                          }
}
return 1;
   }
 return 0;
}


Espero que te sirva, otra cosa.... las funciones IsNumeric, FindPlayerIDFromString, strtok,.... ya las tienes definidas en tu GM??, bueno, aunque estas, suelen estar en include dutils.

Por cierto, lo que es:

public OnPlayerCommandText(playerid, cmdtext[])
{
       new cmd[256], idx;              
       cmd = strtok(cmdtext, idx);



Abajo del callback "OnPlayerCommandText( playerid, cmdtext[])", esos tambien tienes que ponerlos, a si como lo muestro en el code, y si ya estan, pues ya no las pongas.

Salud2.
#58
mIRC/pawn Scripting / Re: Help GUPS...
January 27, 2011, 03:58:06 AM
need to identify in part, "public OnPickedUp", the id of the pickups in specific, what will those who send a message by touching one separately.
#59
o sea, estas haciendo un GM en blanco nuevo, y quieres meter ese comando a ese nuevo server que estas haciendo tu???
#60
mIRC/pawn Scripting / Re: Speedometer In gups help me :/
December 19, 2010, 06:26:02 AM
I remember had issue with the same question :-\