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.


Messages - kitt85711

Pages: 1 [2] 3 4 5
16
mIRC/pawn Scripting / Re: Counting
« on: July 25, 2012, 07:09:46 am »
Can I please get some help here, I think this is the heart of the cops and the functions cops get to have.

17
mIRC/pawn Scripting / Re: helps to put on my server gups prison
« on: July 24, 2012, 11:39:53 am »
Matheus just to let you know that isn't his jail. That's sesseby's jail system. Also known as Moby. Just giving credits that's all :)

18
mIRC/pawn Scripting / Re: Jail System
« on: July 24, 2012, 11:37:47 am »
Thanks but no thanks. I want to know how to fix my jail. I don't want to use Mobys because for one thing, it doesn't spawn me anywhere else but the jail cell, another thing is that I want to have most of my commands made by me. + Its in another language :P

19
mIRC/pawn Scripting / Counting
« on: July 23, 2012, 06:46:34 pm »
I want to try to make a command that says /c wanted and it should tell how many people that are wanted in the server and I was looking at !admins and !warns but I feel that is a little too complex for me. I don't how how to work in the parts with the ++ like at the very end of the script.

I have my IsWanted[playerid] but how would i make it count everyone who is wanted in the server

20
mIRC/pawn Scripting / Re: Warning That I dont Get
« on: July 23, 2012, 06:04:30 pm »
Thanks fuzzy :D I just had to fix it up a lil bit :) "gPlayer" to gPlayers and then

[pawn]else if( IsCop[ plr ] == 1 )
{
    new szMsg[ 128 ];
    format( szMsg, sizeof( szMsg ), "*****[Error] %s is a cop!******", gPlayer[playerid] );
    SendClientMessage( playerid, COLOR_YELLOW, szMsg );
    return 1;
}[/pawn]


Make this look like This


[pawn]else if( IsCop[ plr ] == 1 ) {

format( szMsg, sizeof( szMsg ), "*****[Error] %s is a cop!******", gPlayer[playerid] );
SendClientMessage( playerid, COLOR_YELLOW, szMsg );
}[/pawn]

21
mIRC/pawn Scripting / Re: Warning That I dont Get
« on: July 23, 2012, 05:49:42 pm »
I'll try Fuzzy, and Bemito, I didn't forget the ; because it has two others X, plr, X; and I only copied it out of the middle.

22
mIRC/pawn Scripting / Re: Warning That I dont Get
« on: July 23, 2012, 01:30:11 pm »
Plr is defined [pawn]plr = FindPlayerIDFromString(tmp)[/pawn] and here is the warning.

CnR.pwn(1643) : warning 202: number of arguments does not match definition

23
mIRC/pawn Scripting / Warning That I dont Get
« on: July 23, 2012, 11:25:34 am »
I have this on my suspect command

[pawn]else if (IsCop [plr] == 1) SendClientMessage(playerid, COLOR_YELLOW,"*****[Error] %s Is A Cop!*****", gPlayers[playerid]);[/pawn]

And it gives me this warning and when I try it in the server it doesn't work. I spawn as a cop and it still suspects me. And I tried to make an else if that made it so you cant suspect someone that is already wanted but it uses the same thing the IsSuspected[plr]. Can someone help? P.S. Please can someone get back to me on that jail command

24
mIRC/pawn Scripting / Re: helps to put on my server gups prison
« on: July 23, 2012, 08:25:45 am »
Forgot unjail :p


[pawn]}
   else if (strcmp(cmd, "unjail", true) == 0) {
      new szMsg[256], plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if (PlayerInfo[playerid][cop] != 1) SendClientMessage(playerid, COLOR_ORANGE, "Only officers can unjail suspects.");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c unjail [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
         format(szMsg,sizeof(szMsg),"%s unjailed %s and threw his ass in the street",gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll(COLOR_YELLOW,szMsg);
         SetPlayerPos(plr,397.688, -471.821, 11.5172,0,0);
            TogglePlayerControllable(plr,1);
         SetPlayerMarker(plr,1);
      }
      return 1;[/pawn]

25
mIRC/pawn Scripting / Re: helps to put on my server gups prison
« on: July 22, 2012, 06:46:26 pm »
Heres my old one. I'm working on an advance one though but use mine.  }
   else if (strcmp(cmd, "jail", true) == 0) {
      new szMsg[256], plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c jail [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
         format(szMsg,sizeof(szMsg),"%s put %s's ass in the slammer",gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll(COLOR_YELLOW,szMsg);
         SetPlayerPos(plr,387.873, -509.743, 8.98706,0,0);
            TogglePlayerControllable(plr,0);
            RemovePlayerMarker(plr);
            SetPlayerWeapon(plr,0,0);
      }
      return 1;

26
mIRC/pawn Scripting / Re: helps to put on my server gups prison
« on: July 21, 2012, 07:59:13 pm »
I'm not sure if I understand. You need to be more specific than just put a script on your prison. Its a prison that doesn't jail?

27
mIRC/pawn Scripting / Re: Some Help That Got Crashed In The Database
« on: July 21, 2012, 05:35:04 pm »
Ah ok, thank you

28
mIRC/pawn Scripting / Jail System
« on: July 21, 2012, 05:32:28 pm »
I'm tired because I stayed up all night working on my script. But when I'm tired its like I don't give a damn and I just do it. I need a little help with this. I'm making a jail command for my cops N robbers server. And this idea is based on how Argonath's server jail system is. I'm kind of stuck and I get 26 errors and I want to find the source of the problem. So lets start.

I have

[pawn]new AutoJail[MAX_PLAYERS];
new IsJailed[MAX_PLAYERS];[/pawn]

At the top.

Now I have my command that starts it all.

[pawn]}
   else if ( strcmp( cmd, "jail", true ) == 0 )
   {
      new szMsg[ 128 ], plr;
      tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_YELLOW, "*****You need to login first*****");
      else if(IsCop[playerid] == 0) SendClientMessage(playerid, COLOR_YELLOW,"*****Only Officers Of The Law Can Use This*****");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c jail [Nick/ID]");
        else if(strcmp(GetPlayerLocation(playerid), "Vice-City-Prison-Washington-Beach-Vice-City-Beach", false) == 0) SendClientMessage(playerid, COLOR_YELLOW, "*****[Error]You have to be at the jail cells to jail someone!*****");
        else if(strcmp(GetPlayerLocation(plr), "Vice-City-Prison-Washington-Beach-Vice-City-Beach", false) == 0) SendClientMessage(playerid, COLOR_YELLOW, "*****[Error]%s has to be at the jail cells to be jailed!*****", gPlayers[playerid]);
      else if (IsCop[plr] == 1) SendClientMessage(playerid,COLOR_YELLOW,"*****[Error] %s Is A Cop!*****", gPlayers[playerid]);
       else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_YELLOW,"*****[Error] Unknown player*****");
      else if (IsCriminal[plr] == 0) SendClientMessage(playerid,COLOR_YELLOW,"*****[Error] >> %s << has not commited a crime!*****", gPlayers[playerid]);
       {
          format( szMsg, sizeof( szMsg ), "*****Officer >> %s << has jailed >> %s <<*****", gPlayers[ playerid ], gPlayers[ plr ]);
         SendClientMessageToAll( COLOR_YELLOW, szMsg );
         SetPlayerPos(plr,387.873, -509.743, 8.98706,0,0);
         (IsJailed [plr] = 1);
         TogglePlayerControllable(plr,0);
            RemovePlayerMarker(plr);
      }
      return 1;[/pawn]

I tried this one before but Stormeus was telling me about how you can't put timers on other people. So I thought it's just like a trap. Why not push them in and it works all by itself. So since they are jailed I'm telling the server they are and it should start the auto jail

My publics

[pawn]public OnPlayerJail(playerid)
{
if (IsJailed[playerid] == 1){
SetTimer("Jailed", 100000, 0);
GameTextForPlayer(playerid, "~w~Jailed", 60000,0,0);
AutoJail[playerid] = 1;
}
return 1;

}

public OnPlayerAutoJail(playerid)
{
AutoJail[playerid] = 1;
if (strcmp(GetPlayerLocation(playerid), "Vice-City-Prison-Washington-Beach-Vice-City-Beach", false) == 0){
SetTimer("AutoJail", 3000, 1);
}
if (AutoJail[playerid] == 0){
KillTimer("AutoJail");
return 1;

}
[/pawn]

And then I have my timers

[pawn]public Jailed( playerid )
{
   AutoJail[playerid] = 0;
   SendClientMessage(playerid, COLOR_YELLOW, "*****You have been released out of jail*****");
}

public AutoJail( playerid )
{
SetPlayerPos(playerid, 387.873, -509.743, 8.98706,0,0);
}[/pawn]

Is this not genius or what? :P heheh. Anyways I get these errors and I know on my public the if fails. I need something to put in that if.
Quote
if (strcmp(GetPlayerLocation(playerid), "Vice-City-Prison-Washington-Beach-Vice-City-Beach", false) == 0){

29
mIRC/pawn Scripting / Re: Some Help That Got Crashed In The Database
« on: July 21, 2012, 05:58:45 am »
Its more than one include. Its Aban and then two others that want me to replace Dini and Dutlis
 Aban one

Quote
/*
 *            Aban 1.0
 *       (c) Copyright 2011 by Aldo
 *
 * @author    : Aldo (www.aldo-aldo.com), ([email protected])
 * @date      : 13th May 2011
 * @update    : 13th May 2011
 * @require   : Dini 1.5.1 by DracoBlue (http://dracoblue.com)
 *
 * This include is provided as is (no warranties).
 *
 */
 
 #if defined _aban_included
  #endinput
#endif

#define _aban_included
#pragma library dini

#include <dini>
#define BANFILE    "/Bans/%s.ini"
#define SBANFILE    "/Bans/Subnets/%s.ini"

//====================================================================================================
stock BanIP(IP[], Admin[], Player[], Reason[])
{
   new ban[30];
    format(ban, sizeof(ban), BANFILE, IP);
    dini_Create(ban);
   dini_Set(ban, "Username", Player);
   dini_Set(ban, "IP", IP);
   dini_Set(ban, "Banned-By", Admin);
   dini_Set(ban, "Reason", Reason);
   return true;
}

stock Unbanip(IP[])
{
   new ban[30];
   format(ban, sizeof(ban), BANFILE, IP);
   if(!dini_Exists(ban))
   {
      return false;
   }
   else
   {
      dini_Remove(ban);
      return true;
   }
}

stock BanCheckIP(player)
{
   new IP[16], ban[30];
    GetPlayerIp(player,IP,16);
    format(ban, sizeof(ban), BANFILE, IP);
    if(dini_Exists(ban))
   {
        new name[MAX_PLAYER_NAME], string[50];
        GetPlayerName(player,name,MAX_PLAYER_NAME);
        format(string, sizeof(string), "[AUTO KICK] %s was kicked for Banned IP",name);
        SendClientMessageToAll(0xF6A113FF, string);
        Kick(player);
      return true;
    }
   else
   {
      return false;
   }
}

stock Unbanname(name[])
{
   new ban[30];
   format(ban, sizeof(ban), BANFILE, name);
   if(!dini_Exists(ban))
   {
      return false;
   }
   else
   {
      dini_Remove(ban);
      return true;
   }
}

stock BanName(IP[], Admin[], Player[], Reason[])
{
   new ban[30];
    format(ban, sizeof(ban), BANFILE, Player);
    dini_Create(ban);
   dini_Set(ban, "Username", Player);
   dini_Set(ban, "IP", IP);
   dini_Set(ban, "Banned-By", Admin);
   dini_Set(ban, "Reason", Reason);
   return true;
}

stock BanCheckName(player)
{
   new ban[30];
   new name[MAX_PLAYER_NAME];
    GetPlayerName(player,name,MAX_PLAYER_NAME);
    format(ban, sizeof(ban), BANFILE, name);
    if(dini_Exists(ban))
   {
        new string[60];
        format(string, sizeof(string), "[AUTO KICK] %s was kicked for Banned Nick",name);
        SendClientMessageToAll(0xF6A113FF, string);
        Kick(player);
      return true;
   }
   else
   {
      return false;
   }
}

//====================================================================================================
stock GetSubnet(IP[])
{//This function is made by aXXo :)
   new IP1[76],IP2[76],counter=0;
   IP1=strtok(IP,counter,'.');
   IP2=strtok(IP,counter,'.');
   new Subnet[72];
   format(Subnet,sizeof(Subnet),"%s.%s",IP1,IP2);
   return Subnet;
}

stock Subnetunban(IP[])
{
   new sban[30];
   format(sban, sizeof(sban), SBANFILE, GetSubnet(IP));
   if(!dini_Exists(sban))
   {
      return false;
   }
   else
   {
      dini_Remove(sban);
      return true;
   }
}

stock SubnetbanCheck(player)
{
   new IP[16],sban[30];
   GetPlayerIp(player,IP,16);
   format(sban, sizeof(sban), SBANFILE, GetSubnet(IP));
   if(dini_Exists(sban))
   {
       new name[MAX_PLAYER_NAME], string[50];
        GetPlayerName(player,name,MAX_PLAYER_NAME);
        format(string, sizeof(string), "[AUTO KICK] %s was kicked for Banned Subnet",name);
        SendClientMessageToAll(0xF6A113FF, string);
        Kick(player);
      return true;
   }
   else
   {
      return false;
   }
}

stock Subnetban(IP[], Admin[], Player[], Reason[])
{
   new sban[30];
    format(sban, sizeof(sban), SBANFILE, GetSubnet(IP));
    dini_Create(sban);
   dini_Set(sban, "Username", Player);
   dini_Set(sban, "IP", IP);
   dini_Set(sban, "Banned-By", Admin);
   dini_Set(sban, "Reason", Reason);
   return true;
}

//====================================================================================================



30
mIRC/pawn Scripting / Re: Some Help That Got Crashed In The Database
« on: July 21, 2012, 04:23:21 am »
Thanks Dilson and Liska  :D Now I want to know why the include of the ban and sub ban wont work even if I add it on the top of my gamemode.

Pages: 1 [2] 3 4 5