[Ajuda] Trocar comando
#6

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Comando pronto abaixo, se funcionar avisa aqui no tуpico. Espero ter ajudado!

PHP код:
CMD:cativeiro(playeridparams[])
{
    new 
idplayertempo;
    new 
org GetPlayerOrg(playerid);
    if(
sscanf(params"id"idplayertempo)) return SendClientMessage(playerid,-1,"USE: /cativeiro [Id] [tempo");
    if(!
IsPlayerConnected(idplayer)) return SendClientMessage(playerid, -1"[ ERRO ] Este player nгo estб conectado!");
    if(
ProxDetectorS(3.0,playerid,idplayer))
    {
        if(
PlayerInfo[idplayer][pMembro] == 6||PlayerInfo[idplayer][pLider] == 6) return SendClientMessage(playerid,COLOR_GRAD1,"Vocк nгo pode prender um terrorista no cativeiro.");
        if((
org == 6) && PlayerToPoint(2.0playerid,-1104.1871,-1666.2097,76.4672))
        
ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        
PlayerInfo[idplayer][pJailed] = 4;
        
PlayerInfo[idplayer][pJailTime] = tempo*60;
        
PlayerInfo[idplayer][pPnumber] = 0;
        
Telefoneoff[idplayer] = 1;
        
ResetPlayerWeapons(idplayer);
        
SetPlayerPos(idplayer,-1104.1200,-1664.0133,76.4672);
        
SetCameraBehindPlayer(idplayer);
        return 
true;
    }
    else
    {
        
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo esta proximo ao cara.");
    }
    return 
1;

Mas vc nгo entendeu, esse comando ae, й sу uma base de como eu quero trocar, quero trocar esse comando aqui..

pawn Код:
if (strcmp(cmd, "/boombox", true) == 0)
    {
        if (IsPlayerConnected(playerid))
        {
            new string[128];
            if (!GetPVarType(playerid, "BoomboxObject"))
            {
                if (sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /boombox [music url]");
                foreach(Player, i)
                {
                    if (GetPVarType(i, "BoomboxObject"))
                    {
                        if (IsPlayerInRangeOfPoint(playerid, 30.0, GetPVarFloat(i, "bposX"), GetPVarFloat(i, "bposY"), GetPVarFloat(i, "bposZ")))
                        {
                            SendClientMessage(playerid, COLOR_GREY, " There is another boombox nearby, place yours somewhere else.");
                            return 1;
                        }
                    }
                }

                new Float: x,
                Float: y,
                Float: z,
                Float: a;
                GetPlayerPos(playerid, x, y, z);
                GetPlayerFacingAngle(playerid, a);
                SetPVarInt(playerid, "BoomboxObject", CreateDynamicObject(2103, x, y, z, 0.0, 0.0, 0.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)));
                SetPVarFloat(playerid, "bposX", x);
                SetPVarFloat(playerid, "bposY", y);
                SetPVarFloat(playerid, "bposZ", z);
                SetPVarInt(playerid, "bboxareaid", CreateDynamicSphere(x, y, z, 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)));
                format(string, sizeof(string), " You have placed your boombox at your location.");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                foreach(Player, i)
                {
                    if (IsPlayerInDynamicArea(i, GetPVarInt(playerid, "bboxareaid")))
                    {
                        PlayAudioStreamForPlayer(i, params, GetPVarFloat(playerid, "bposX"), GetPVarFloat(playerid, "bposY"), GetPVarFloat(playerid, "bposZ"), 30.0, 1);
                    }
                }
                SetPVarString(playerid, "BoomboxURL", params);
            }
            else
            {
                DestroyDynamicObject(GetPVarInt(playerid, "BoomboxObject"));
                DeletePVar(playerid, "BoomboxObject");
                DeletePVar(playerid, "BoomboxURL");
                DeletePVar(playerid, "bposX");
                DeletePVar(playerid, "bposY");
                DeletePVar(playerid, "bposZ");
                if (GetPVarType(playerid, "bboxareaid"))
                {
                    foreach(Player, i)
                    {
                        if (IsPlayerInDynamicArea(i, GetPVarInt(playerid, "bboxareaid")))
                        {
                            StopAudioStreamForPlayer(i);
                            SendClientMessage(i, COLOR_GREY, " The boombox creator has removed his boombox.");
                        }
                    }
                    DeletePVar(playerid, "bboxareaid");
                }
                SendClientMessage(playerid, COLOR_LIGHTBLUE, " You have removed your boombox.");
            }
        }
        return 1;
CMD:boomboxnext(playerid, params[])
{
    if(!Boombox[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You don't have a boombox placed.");
    if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /boomboxnext [music url]");
    SendClientMessage(playerid, COLOR_GREY, " You have changed the music your boombox is playing.");
    foreach(Player, i)
    {
        if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "bboxareaid")))
        {
            PlayAudioStreamForPlayer(i, params, GetPVarFloat(playerid, "bposX"), GetPVarFloat(playerid, "bposY"), GetPVarFloat(playerid, "bposZ"), 30.0, 1);
        }
    }
    SetPVarString(playerid, "BoomboxURL", params);
    return 1;
}
para oque vc me mandou, pq ae usa um tipo diferente de comando, nгo lembro o nome..
Reply


Messages In This Thread
Trocar comando - by SukMathcuck - 11.12.2014, 18:03
Re: Trocar comando - by MultiKill - 11.12.2014, 18:08
Re: Trocar comando - by SukMathcuck - 11.12.2014, 18:09
Re: Trocar comando - by MultiKill - 11.12.2014, 18:27
Re: Trocar comando - by [BOPE]Seu._.Madruga - 11.12.2014, 18:37
Re: Trocar comando - by SukMathcuck - 11.12.2014, 18:42
Re: Trocar comando - by [BOPE]Seu._.Madruga - 11.12.2014, 18:53

Forum Jump:


Users browsing this thread: 1 Guest(s)