[PEDIDO]Como crear Comando Jail Solo para Policia
#1

Hola miren quiero ver si aquien me puede pasar un ejemplo de Como acer que los Policias pongan /Jail
Solo los Policias
Los Civiles No puedan ponerlo
Bueno si alguien me pone Un ejemplo
Reply
#2

supongo que es if(gTeam[playerid] == 2 || IsACop(playerid)) tambien esta este otro if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)


Reply
#3

Me podrias dar La Respuesta Con un comando? Gracias
Reply
#4

Код:
if (strcmp(cmd, "/jail", true) == 0)
	{
		new
			tmp[20],
			id;
		tmp = strtok(cmdtext, index);
		if (strlen(tmp))
		{
		
			id = strval(tmp);
			if(gTeam[playerid] == 2 || TEAM_POLICE(playerid))
			{
				SetPlayerInterior(id,3);
				SetPlayerPos(id,197.6129,175.4507,1003.0234);
				SendClientMessage(id, 0x00FF00AA, "Has sido jailado Por un Policia");
				SendClientMessage(playerid, 0x00FF00AA, "Jugador jailado");
			}
			else
			{
			
				SendClientMessage(playerid, 0xFF0000AA, "No eres Policia");
		}
		return 1;
	}
	if (strcmp(cmd, "/unjail", true) == 0)
	{
		new
		tmp[20],
		id;
		tmp = strtok(cmdtext, index);
		if (strlen(tmp))
		{

			id = strval(tmp);
			if(gTeam[playerid] == 3 || TEAM_POLICE(playerid))
			{
			  SetPlayerPos(playerid,2288.8057,2424.1931,10.8203);
			  SendClientMessage(id, 0x00FF00AA, "Has sido unjailado Por un Policia");
			  SendClientMessage(playerid, 0x00FF00AA, "Jugador unjailado");
			}
			else
			{

				SendClientMessage(playerid, 0xFF0000AA, "No eres Policia");
			}
		
		return 1;
	}
Error que me tira...
Код:
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(823) : error 017: undefined symbol "isStringSame"
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(878) : error 017: undefined symbol "strtok"
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(878) : error 033: array must be indexed (variable "cmd")
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(883) : error 017: undefined symbol "strtok"
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(883) : error 033: array must be indexed (variable "cmd")
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(886) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(887) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(888) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(889) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(890) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(893) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(894) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(895) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(896) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(897) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(898) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(901) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(902) : error 004: function "SendPlayerFormattedText" is not implemented
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(909) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(915) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(919) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(924) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(937) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(946) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(951) : error 079: inconsistent return types (array & non-array)
C:\SUBZER~1\GAMEMO~1\GAMEMO~1.PWN(956) : error 079: inconsistent return types (array & non-array)

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#5

pawn Код:
if (strcmp(cmd, "/jail", true) == 0)
  {
    new
      tmp[20],
      id;
        tmp = strtok(cmdtext, index);
        if (strlen(tmp))
        {

            id = strval(tmp);
            if(gTeam[playerid] == 2 || TEAM_POLICE(playerid))
            {
                SetPlayerInterior(id,3);
                SetPlayerPos(id,197.6129,175.4507,1003.0234);
                SendClientMessage(id, 0x00FF00AA, "Has sido jailado Por un Policia");
                SendClientMessage(playerid, 0x00FF00AA, "Jugador jailado");
            }
            else
            {

                SendClientMessage(playerid, 0xFF0000AA, "No eres Policia");
            }
        }
        return 1;
    }
    if (strcmp(cmd, "/unjail", true) == 0)
    {
        new
        tmp[20],
        id;
        tmp = strtok(cmdtext, index);
        if (strlen(tmp))
        {

            id = strval(tmp);
            if(gTeam[playerid] == 3 || TEAM_POLICE(playerid))
            {
              SetPlayerPos(playerid,2288.8057,2424.1931,10.8203);
              SendClientMessage(id, 0x00FF00AA, "Has sido unjailado Por un Policia");
              SendClientMessage(playerid, 0x00FF00AA, "Jugador unjailado");
            }
            else
            {

                SendClientMessage(playerid, 0xFF0000AA, "No eres Policia");
            }
        }
        return 1;
    }
Debes cuidar mas los brackets '{' '}' de tus codigos.
Reply
#6

Eso te sale en algъn admin filterscript :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)