SA-MP Forums Archive
Esposas 0.3e - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Esposas 0.3e (/showthread.php?tid=358265)



Esposas 0.3e - Glimma - 10.07.2012

Buenas, tengo el GM de CM 4.0, entonces, coloquй la animaciуn de esposas con su correspondiente objeto, pero... me tira errores.

Comando:

pawn Код:
zcmd(esposar, playerid, params[])
    {
        if(!IsACop(playerid) && !Team_NG(playerid) && !Team_FBI(playerid)) return Message(playerid, COLOR_GRAD2, "No eres policнa.");
        if(!sscanf(params, "u", params[0]))
        {
            if (params[0] == playerid) return Message(playerid, COLOR_GRAD2, "ЎNo puedes esposarte a ti mismo!");
            if (ProxDetectorS(8.0, playerid, params[0]))
            {
                new string[128];
                if(PlayerCuffed[params[0]] == 0)
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y le coloca unas esposas, acto seguido las cierra", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                    SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
                    GameTextForPlayer(params[0], "~r~ESPOSADO", 2500, 3);
                    PlayerCuffed[params[0]] = 1;
                    SetPlayerWalkingStyle(params[0], WALK_PED);
                    return 1;
                }
                else
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y abre las esposas con las llaves", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_NONE);
                    RemovePlayerAttachedObject(giveplayerid, playerid);
                    GameTextForPlayer(params[0], "~g~LIBRE", 2500, 3);
                    PlayerCuffed[params[0]] = 0;
                    SetPlayerWalkingStyle(params[0], PlayerInfo[params[0]][pWalk]);
                    return 1;
                }
            } else Message(playerid, COLOR_GREY, "El jugador estб muy lejos.");
        } else Message(playerid, COLOR_GRAD2, "Utilize: /esposar <ID>");
        return 1;
    }
Errores:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22215) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22216) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22226) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22227) : error 017: undefined symbol "giveplayerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
En caso de que algo estй mal definidio, їcуmo y dуnde lo defino?


Respuesta: Esposas 0.3e - Shiny_David - 10.07.2012

prueba asi:

pawn Код:
zcmd(esposar, playerid, params[])
    {
        if(!IsACop(playerid) && !Team_NG(playerid) && !Team_FBI(playerid)) return Message(playerid, COLOR_GRAD2, "No eres policнa.");
        if(!sscanf(params, "u", params[0]))
        {
            if (params[0] == playerid) return Message(playerid, COLOR_GRAD2, "ЎNo puedes esposarte a ti mismo!");
            if (ProxDetectorS(8.0, playerid, params[0]))
            {
                new string[128];
                if(PlayerCuffed[params[0]] == 0)
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y le coloca unas esposas, acto seguido las cierra", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(params[0], SPECIAL_ACTION_CUFFED);
                    SetPlayerAttachedObject(params[0], 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
                    GameTextForPlayer(params[0], "~r~ESPOSADO", 2500, 3);
                    PlayerCuffed[params[0]] = 1;
                    SetPlayerWalkingStyle(params[0], WALK_PED);
                    return 1;
                }
                else
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y abre las esposas con las llaves", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(params[0],SPECIAL_ACTION_NONE);
                    RemovePlayerAttachedObject(params[0], playerid);
                    GameTextForPlayer(params[0], "~g~LIBRE", 2500, 3);
                    PlayerCuffed[params[0]] = 0;
                    SetPlayerWalkingStyle(params[0], PlayerInfo[params[0]][pWalk]);
                    return 1;
                }
            } else Message(playerid, COLOR_GREY, "El jugador estб muy lejos.");
        } else Message(playerid, COLOR_GRAD2, "Utilize: /esposar <ID>");
        return 1;
    }



Re: Esposas 0.3e - .FuneraL. - 10.07.2012

Quote:
Originally Posted by DeadSkyTkb
Посмотреть сообщение
Buenas, tengo el GM de CM 4.0, entonces, coloquй la animaciуn de esposas con su correspondiente objeto, pero... me tira errores.

Comando:

pawn Код:
zcmd(esposar, playerid, params[])
    {
        if(!IsACop(playerid) && !Team_NG(playerid) && !Team_FBI(playerid)) return Message(playerid, COLOR_GRAD2, "No eres policнa.");
        if(!sscanf(params, "u", params[0]))
        {
            if (params[0] == playerid) return Message(playerid, COLOR_GRAD2, "ЎNo puedes esposarte a ti mismo!");
            if (ProxDetectorS(8.0, playerid, params[0]))
            {
                new string[128];
                if(PlayerCuffed[params[0]] == 0)
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y le coloca unas esposas, acto seguido las cierra", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
                    SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
                    GameTextForPlayer(params[0], "~r~ESPOSADO", 2500, 3);
                    PlayerCuffed[params[0]] = 1;
                    SetPlayerWalkingStyle(params[0], WALK_PED);
                    return 1;
                }
                else
                {
                    format(string, sizeof(string), "* Oficial %s toma las manos del sospechoso %s y abre las esposas con las llaves", PlayerName(playerid), PlayerName(params[0]));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_NONE);
                    RemovePlayerAttachedObject(giveplayerid, playerid);
                    GameTextForPlayer(params[0], "~g~LIBRE", 2500, 3);
                    PlayerCuffed[params[0]] = 0;
                    SetPlayerWalkingStyle(params[0], PlayerInfo[params[0]][pWalk]);
                    return 1;
                }
            } else Message(playerid, COLOR_GREY, "El jugador estб muy lejos.");
        } else Message(playerid, COLOR_GRAD2, "Utilize: /esposar <ID>");
        return 1;
    }
Errores:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22215) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22216) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22226) : error 017: undefined symbol "giveplayerid"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\cm.pwn(22227) : error 017: undefined symbol "giveplayerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
En caso de que algo estй mal definidio, їcуmo y dуnde lo defino?
new giveplayerid; en la parte superior de la orden.


Respuesta: Esposas 0.3e - Glimma - 10.07.2012

Probй lo que dijo Funeral, y copilу bien, el problema es que ahora no funciona, lo pruebo IG y no se aplica la animaciуn ni nada.

Ademбs, probй lo que dijo Shiny, y copilу bien, pero la animaciуn y el toy se aplica para el jugador que realiza la acciуn, y no al que se la realiza.


Respuesta: Esposas 0.3e - Shiny_David - 10.07.2012

Quote:
Originally Posted by DeadSkyTkb
Посмотреть сообщение
Probй lo que dijo Funeral, y copilу bien, el problema es que ahora no funciona, lo pruebo IG y no se aplica la animaciуn ni nada.

Ademбs, probй lo que dijo Shiny, y copilу bien, pero la animaciуn y el toy se aplica para el jugador que realiza la acciуn, y no al que se la realiza.
eso no tiene sentido si esta fijado para aplicarse al usuario que el oficial arresta


Respuesta: Esposas 0.3e - Glimma - 10.07.2012

Me salteй algo, finalmente, lo de Shiny me sirviу, muchas gracias, +rep.

Pueden cerrar.-