[AJUDA] Algemas 0.3e
#1

se alguem poder me ajudar
esse e meu gode: da minhas algemas: (/algemar й /desalgemar)

sй alguem tiver a gentileza de fazer um code das algemas novas do samp 0.3e
dou +rep

Код:
	if(strcmp(cmd, "/algemar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(!IsACop(playerid))
			{
			    MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й um policial!");
			    return 1;
			}
			if(OnDuty[playerid] != 1)
			{
			    MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo Bateu o cartгo!");
			    return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				MSGPLAYER(playerid, COLOR_WHITE, "Use: /algemar [id]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
			        {
			            MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo pode algemar COPs !");
				        return 1;
			        }
				    if(PlayerCuffed[giveplayerid] > 0)
				    {
				        MSGPLAYER(playerid, COLOR_GREY, "   O Jogador jб esta algemado !");
				        return 1;
				    }
					if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
					    new car = GetPlayerVehicleID(playerid);
					    if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nao pode se algemar!"); return 1; }
					    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
					    {
					        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
					        format(string, sizeof(string), "* Vocк foi algemado pelo: %s.", sendername);
							MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "* Vocк algemou %s.", giveplayer);
							MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "* %s Algemou %s, para nao fugir.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							GameTextForPlayer(giveplayerid, "~r~Algemado", 2500, 3);
							Controle(giveplayerid, 0);
							PlayerCuffed[giveplayerid] = 2;
							PlayerInfo[giveplayerid][pMuted] = 1;
					    }
					    else
					    {
					        MSGPLAYER(playerid, COLOR_GREY, "   O Jogador nгo estб no carro ou vocк nгo й o motorista !");
					        return 1;
					    }
					}
					else
					{
					    MSGPLAYER(playerid, COLOR_GREY, "   O Jogador estб longe de Vocк !");
					    return 1;
					}
				}
			}
			else
			{
			    MSGPLAYER(playerid, COLOR_GREY, "   O Jogador Estб Off-Line !");
			    return 1;
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/desalgemar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(gTeam[playerid] == 2 || IsACop(playerid))
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					MSGPLAYER(playerid, COLOR_WHITE, "Use: /desalgemar [id]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
					{
					    if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo pode se desalgemar!"); return 1; }
							if(PlayerCuffed[giveplayerid])
							{
							    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* Vocк foi desalgemado pelo: %s.", sendername);
								MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), "* Vocк desalgemou %s.", giveplayer);
								MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
								GameTextForPlayer(giveplayerid, "~g~Desalgemado", 2500, 3);
								Controle(giveplayerid, 1);
								PlayerCuffed[giveplayerid] = 0;
								PlayerInfo[giveplayerid][pMuted] = 0;
							}
							else
							{
							    MSGPLAYER(playerid, COLOR_GREY, "   Este jogador nгo estб algemado !");
							    return 1;
							}
						}
						else
						{
						    MSGPLAYER(playerid, COLOR_GREY, "   O Jogador estб longe de vocк !");
						    return 1;
						}
					}
				}
				else
				{
				    MSGPLAYER(playerid, COLOR_GREY, "   O Jogador Estб Off-Line !");
				    return 1;
				}
			}
			else
			{
				MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo e PM/PR/PC/Exercito !");
			}
		}//not connected
		return 1;
	}
Reply
#2

pawn Код:
if(strcmp(cmd, "/algemar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!IsACop(playerid))
            {
                MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й um policial!");
                return 1;
            }
            if(OnDuty[playerid] != 1)
            {
                MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo Bateu o cartгo!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_WHITE, "Use: /algemar [id]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
                    {
                        MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo pode algemar COPs !");
                        return 1;
                    }
                    if(PlayerCuffed[giveplayerid] > 0)
                    {
                        MSGPLAYER(playerid, COLOR_GREY, "   O Jogador jб esta algemado !");
                        return 1;
                    }
                    if (ProxDetectorS(8.0, playerid, giveplayerid))
                    {
                        new car = GetPlayerVehicleID(playerid);
                        if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nao pode se algemar!"); return 1; }
                        if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
                        {
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* Vocк foi algemado pelo: %s.", sendername);
                            MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Vocк algemou %s.", giveplayer);
                            MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* %s Algemou %s, para nao fugir.", sendername ,giveplayer);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            GameTextForPlayer(giveplayerid, "~r~Algemado", 2500, 3);
                            SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                            SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                            Controle(giveplayerid, 0);
                            PlayerCuffed[giveplayerid] = 2;
                            PlayerInfo[giveplayerid][pMuted] = 1;
                        }
                        else
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   O Jogador nгo estб no carro ou vocк nгo й o motorista !");
                            return 1;
                        }
                    }
                    else
                    {
                        MSGPLAYER(playerid, COLOR_GREY, "   O Jogador estб longe de Vocк !");
                        return 1;
                    }
                }
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GREY, "   O Jogador Estб Off-Line !");
                return 1;
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/desalgemar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gTeam[playerid] == 2 || IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    MSGPLAYER(playerid, COLOR_WHITE, "Use: /desalgemar [id]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (ProxDetectorS(8.0, playerid, giveplayerid))
                        {
                            if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo pode se desalgemar!"); return 1; }
                            if(PlayerCuffed[giveplayerid])
                            {
                                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                                GetPlayerName(playerid, sendername, sizeof(sendername));
                                format(string, sizeof(string), "* Vocк foi desalgemado pelo: %s.", sendername);
                                MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
                                format(string, sizeof(string), "* Vocк desalgemou %s.", giveplayer);
                                MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
                                GameTextForPlayer(giveplayerid, "~g~Desalgemado", 2500, 3);
                                RemovePlayerAttachedObject(giveplayerid, 4);
                                SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_NONE);
                                Controle(giveplayerid, 1);
                                PlayerCuffed[giveplayerid] = 0;
                                PlayerInfo[giveplayerid][pMuted] = 0;
                            }
                            else
                            {
                                MSGPLAYER(playerid, COLOR_GREY, "   Este jogador nгo estб algemado !");
                                return 1;
                            }
                        }
                        else
                        {
                            MSGPLAYER(playerid, COLOR_GREY, "   O Jogador estб longe de vocк !");
                            return 1;
                        }
                    }
                }
                else
                {
                    MSGPLAYER(playerid, COLOR_GREY, "   O Jogador Estб Off-Line !");
                    return 1;
                }
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo e PM/PR/PC/Exercito !");
            }
        }//not connected
        return 1;
    }
Reply
#3

man deu 1 erro
olha ai

se possivel tem como arrumar?

Код:
C:\Users\Windows 7\Desktop\l-PlayExclusive-l --- 0.3e ---\gamemodes\Bac.pwn(54413) : warning 217: loose indentation
C:\Users\Windows 7\Desktop\l-PlayExclusive-l --- 0.3e ---\gamemodes\Bac.pwn(54464) : error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
C:\Users\Windows 7\Desktop\l-PlayExclusive-l --- 0.3e ---\gamemodes\Bac.pwn(54490) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

algueeem AJUDA: por favor

dou +repu
Reply
#5

atualiza as includes...
Reply
#6

tem como me passar as includes eu nгo acho
Reply
#7

http://www.sa-mp.com/download.php
Reply
#8

Eu Adaptei a algema e tals no meu GM e funcionou de boa ae Valeu ae
Reply
#9

aff eu baixei a pasta completa da 0.3e e coloquei meu gm certinho
mais ainda fica dando o erro
me ajuda ae pessoal por favor@

uma pergunta:
tem que colocar
alguma coisa
no
new , etc..

se tiver que fazer isto me avisa
por favor;
Reply
#10

Quote:
Originally Posted by iDeagle_Hurley
Посмотреть сообщение
aff eu baixei a pasta completa da 0.3e e coloquei meu gm certinho
mais ainda fica dando o erro
me ajuda ae pessoal por favor@
pega ae as minhas includes \/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)