SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 14/07/2012, 01:01 PM   #11
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Meu primeiro fs bugou affs

Arrumei o Seu Portao e coloquei um SetTimer Pra fecha(nao precisa mais usar cmd)
pawn Code:
#include <a_samp>
#include <zcmd>

new PortaoSWAT;

public OnFilterScriptInit()
{
    CreateObject(3749,-73.90000153,-352.79998779,6.19999981,0.00000000,0.00000000,90.00000000); //object(clubgate01_lax) (2)
    CreateObject(987,-75.69999695,-395.10000610,5.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (20)
    CreateObject(987,-63.79999924,-395.20001221,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (21)
    CreateObject(987,-53.00000000,-395.39999390,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (22)
    CreateObject(987,-41.40000153,-395.39999390,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23)
    CreateObject(987,-30.60000038,-395.39999390,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (24)
    CreateObject(987,-18.79999924,-395.39999390,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (25)
    CreateObject(987,-75.69999695,-363.00000000,5.90000010,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (27)
    CreateObject(987,-75.59999847,-374.60000610,3.90000010,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (28)
    CreateObject(987,-75.80000305,-384.50000000,5.90000010,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (29)
    CreateObject(987,-75.59999847,-331.29998779,5.09999990,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (30)
    CreateObject(987,-76.00000000,-298.89999390,5.90000010,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (31)
    CreateObject(987,-75.69999695,-310.50000000,5.80000019,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (33)
    CreateObject(987,-75.69999695,-374.70001221,5.80000019,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (34)
    CreateObject(987,-75.69999695,-321.50000000,4.30000019,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (35)
    CreateObject(987,-75.69999695,-321.29998779,5.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (36)
    CreateObject(987,-9.50000000,-395.39999390,5.40000010,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (37)
    CreateObject(987,-0.40000001,-395.39999390,5.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (38)
    CreateObject(987,5.69999981,-395.39999390,5.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (39)
    CreateObject(987,17.60000038,-395.70001221,5.59999990,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (40)
    CreateObject(987,17.50000000,-386.10000610,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (41)
    CreateObject(987,17.39999962,-377.00000000,6.69999981,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (42)
    CreateObject(987,17.50000000,-367.70001221,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (43)
    CreateObject(987,17.50000000,-356.89999390,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (44)
    CreateObject(987,17.50000000,-347.39999390,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (45)
    CreateObject(987,17.39999962,-337.10000610,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (46)
    CreateObject(987,17.29999924,-327.79998779,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (47)
    CreateObject(987,17.29999924,-318.70001221,5.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (48)
    CreateObject(987,17.29999924,-308.70001221,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (49)
    CreateObject(987,17.29999924,-299.60000610,5.59999990,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (50)
    CreateObject(987,17.39999962,-288.60000610,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (51)
    CreateObject(987,17.50000000,-280.79998779,5.40000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (52)
    CreateObject(987,17.60000038,-270.89999390,5.90000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (53)
    CreateObject(987,17.70000076,-261.79998779,5.90000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (54)
    CreateObject(987,17.79999924,-250.60000610,5.90000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (55)
    CreateObject(987,17.79999924,-239.39999390,5.90000010,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (56)
    CreateObject(987,17.89999962,-230.50000000,6.00000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (57)
    CreateObject(987,17.89999962,-219.00000000,6.09999990,0.00000000,0.00000000,175.00000000); //object(elecfence_bar) (58)
    CreateObject(987,7.30000019,-218.00000000,5.90000010,0.00000000,0.00000000,174.99572754); //object(elecfence_bar) (60)
    CreateObject(987,-4.09999990,-216.80000305,5.80000019,0.00000000,0.00000000,174.99572754); //object(elecfence_bar) (61)
    CreateObject(987,-14.89999962,-215.69999695,5.80000019,0.00000000,0.00000000,174.99572754); //object(elecfence_bar) (63)
    CreateObject(987,-25.10000038,-214.89999390,5.69999981,0.00000000,0.00000000,173.00000000); //object(elecfence_bar) (64)
    CreateObject(987,-36.00000000,-213.30000305,5.59999990,0.00000000,0.00000000,174.99572754); //object(elecfence_bar) (65)
    CreateObject(987,-47.29999924,-212.10000610,5.40000010,0.00000000,0.00000000,172.99621582); //object(elecfence_bar) (67)
    CreateObject(971,-61.09999847,-214.60000610,7.09999990,0.00000000,0.00000000,90.00000000); //object(subwaygate) (1)
    CreateObject(987,-49.40000153,-211.50000000,5.90000010,0.00000000,0.00000000,172.99621582); //object(elecfence_bar) (68)
    PortaoSWAT = CreateObject(980, -74.400001525879, -352.89999389648, 3.2000000476837, 0.0000, 0.0000, 90.0000);
    return 1;
}

CMD:abrirswat(playerid, params[])
{
    MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 8.1999998092651, 3.0, 0.0000, 0.0000, 90.0000);
    GameTextForPlayer(playerid, " | INFO | ~g~Abrindo portão da base [S.W.A.T]...", 3000, 6);
    SetTimer("FecharPortao", 10000, false);
    return 1;
}
CMD:fecharswat(playerid, params[])
{
    MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 3.2000000476837, 3.0, 0.0000, 0.0000, 90.0000);
    GameTextForPlayer(playerid, " | INFO | ~g~Fechando portão da base [S.W.A.T]...", 3000, 6);
    return 1;
}
/*forward FecharPortao(playerid);
public FecharPortao(playerid)
{
    MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 3.2000000476837, 3.0, 0.0000, 0.0000, 90.0000);
    GameTextForPlayer(playerid, " | INFO | ~g~Fechando portão da base [S.W.A.T]...", 3000, 6);
    return 1;
}*/
__________________
SAMP AINDA EXISTE ... LOL
:O

Last edited by Panico622; 14/07/2012 at 02:51 PM.
Panico622 is offline   Reply With Quote
Old 14/07/2012, 01:08 PM   #12
Jason`
High-roller
 
Jason`'s Avatar
 
Join Date: Sep 2011
Posts: 1,464
Reputation: 112
Default Re: Meu primeiro fs bugou affs

Teria de ser SetTimerEx não?
Jason` is offline   Reply With Quote
Old 14/07/2012, 01:10 PM   #13
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Meu primeiro fs bugou affs

Acho que não, assim funcionou perfeitamente
__________________
SAMP AINDA EXISTE ... LOL
:O
Panico622 is offline   Reply With Quote
Old 14/07/2012, 01:10 PM   #14
billy the kid
Gangsta
 
billy the kid's Avatar
 
Join Date: May 2012
Posts: 522
Reputation: 9
Default Re: Meu primeiro fs bugou affs

mais esse portao ae todos vao poder abri neh !

fica vendo agrinha ele vem ""como coloca so pra uma org determinada abrir o portao""
ou queria que so adm abrisse o portao!

KKK assiste fica so vendo!
billy the kid is offline   Reply With Quote
Old 14/07/2012, 01:27 PM   #15
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Meu primeiro fs bugou affs

é so faze assim dai:
pawn Code:
CMD:abrirswat(playerid, params[])
{
    if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
    {//so altere o com forme o gm(14 e o numero da org)
        MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 8.1999998092651, 3.0, 0.0000, 0.0000, 90.0000);
        GameTextForPlayer(playerid, " | INFO | ~g~Abrindo portão da base [S.W.A.T]...", 3000, 6);
        SetTimer("FecharPortao", 10000, false);
    }
    else return SendClientMessage(playerid, -1, "Vc nao Faz Parte da S.W.A.T");
    return 1;
}
__________________
SAMP AINDA EXISTE ... LOL
:O
Panico622 is offline   Reply With Quote
Old 14/07/2012, 01:31 PM   #16
billy the kid
Gangsta
 
billy the kid's Avatar
 
Join Date: May 2012
Posts: 522
Reputation: 9
Default Re: Meu primeiro fs bugou affs

10000 = 10 segundos certo ?
pode usar tanbem 10*1000 ?
eu estou usando a maioria dos set timer assim tem algum problema ou funciona normal tal!?
billy the kid is offline   Reply With Quote
Old 14/07/2012, 01:33 PM   #17
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Meu primeiro fs bugou affs

Quote:
Originally Posted by billy the kid View Post
10000 = 10 segundos certo ?
pode usar tanbem 10*1000 ?
eu estou usando a maioria dos set timer assim tem algum problema ou funciona normal tal!?
nao sei, mais acho que funciona normal tbm (me corrijam se estiver errado)
__________________
SAMP AINDA EXISTE ... LOL
:O
Panico622 is offline   Reply With Quote
Old 14/07/2012, 01:48 PM   #18
.FuneraL.
High-roller
 
.FuneraL.'s Avatar
 
Join Date: Feb 2012
Location: Notepad++
Posts: 2,071
Reputation: 146
Default Re: Meu primeiro fs bugou affs

Tem que converter pra strcmp, só uma observação, pois ele não utiliza ZCMD.
.FuneraL. is offline   Reply With Quote
Old 14/07/2012, 04:33 PM   #19
ShutDown_
Big Clucker
 
ShutDown_'s Avatar
 
Join Date: Jun 2012
Location: Pernambuco,Brasil.
Posts: 160
Reputation: 9
Default Re: Meu primeiro fs bugou affs

Muda esses dois comandos pra ficarem assim \/

pawn Code:
if(strcmp(cmdtext, "/abrirswat", true) == 0)
    {
        MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 8.1999998092651, 3.0,0.0,0.0,90.0);
        SendClientMessage(playerid, 0x9E3EFFAA, " | INFO | Abrindo portão da base [S.W.A.T]...");
        return 1;
    }
    if(strcmp(cmdtext, "/fecharswat", true) == 0)
    {
        MoveObject(PortaoSWAT,-74.400001525879, -352.89999389648, 3.2000000476837, 3.0,0.0,0.0,90.0);
        SendClientMessage(playerid, 0x9E3EFFAA, " | INFO | Fechando portão da base [S.W.A.T]...");
        return 1;
    }

Porque 0.0,0.0,90.0

Com o samp 0.3d foram adcionadas as cordenadas rx,ry,rz
Então as cordenadas totais ficam assim X,Y,Z,RX,RY,RZ
Procure no google ou no search e vai entender melhor
__________________
ShutDown_ is offline   Reply With Quote
Old 14/07/2012, 04:46 PM   #20
Arthenry
Gangsta
 
Arthenry's Avatar
 
Join Date: Jun 2012
Posts: 555
Reputation: 22
Default Re: Meu primeiro fs bugou affs

Olha tipo eu vo la no local onde ta a base com o portão e o portão ta retinho, ai eu digito /abrirswat ele abre girando e dps para, ai fecha girando e para torto.

Meus codes:

Topo do GM:
pawn Code:
// Portão da base swat
new Gate; // Lembrando que o nome que Colocar aqui será Usado em TODO PROCESSO !
forward CloseGate(gateid); // Deixe QUETO ( Isso que fará com que o Portão Feche )

Em ongamemode init:
pawn Code:
// move portão swat
Gate = CreateObject(980,-74.5,-352.79998779297,3.2000000476837,0,0,90);

Em public onplayercommand text:
pawn Code:
if (strcmp("/abrirswat", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid,15.0, -74.5,-352.79998779297,3.2000000476837))
        {
            MoveObject(Gate,-74.800003051758,-341.79998779297,3.2000000476837,3.0);
            SetTimerEx("CloseGate", 5000, false, "i", Gate);
            SendClientMessage(playerid, COLOR_YELLOW, "Abrindo portão da base [S.W.A.T], seja rápido ele fechará em 5 segundos...");
            return 1;
        }
    }

e no final do gm:
pawn Code:
public CloseGate(gateid)
{
    if(gateid == Gate)
    {
        MoveObject(Gate,-74.5,-352.79998779297,3.2000000476837,3.0);
    }
return 1;
}

Qnd vc vai la fika de frente pro portão ele ta retinho, ai vc digita /abrirswat ele abre torto e fica torto, ai dps de 5 segundos ele fecha torto e fica parado lá tortão '-'
__________________
Meus Projetos

[center][Map] HQ [S.W.A.T] para Org/Clãs
[Map] Delegacia de LS
[FilterScript] Fuja dos Tubarões v2



HostName: [NVC] New Virtual City [RPG]v4.0 [PT/BR]
Address: 216.144.240.173:8010
Players: 22 / 30
Ping: 197
Mode: NVC Games
Map: Los Santos
Arthenry is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[AJUDA] Comando bugou lukas_loky Português/Portuguese 3 08/03/2011 02:55 AM
[AJUDA] TeamKill bugou JuniorArms Português/Portuguese 11 24/01/2011 06:28 PM
[AJUDA]Dinheiro bugou D: Nightwish Português/Portuguese 14 16/01/2011 03:25 PM
[AJUDA]Affs Samp 0.3b R2 duany123 Português/Portuguese 10 23/08/2010 01:05 AM


All times are GMT. The time now is 03:02 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.