if (strcmp(cmdtext, "/lspdpor", true)==0) { MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto SetTimer("GateCloseLSPDGATE", 5000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao LSPD, o portгo irб se fechar em 5 Segundos"); return 1; } if (strcmp(cmdtext, "/lspdgar", true)==0) { MoveObject(LSPDGAR,1586.284,-1638.433,15.964, 3.5);//Fechado MoveObject(LSPDGAR,1576.977,-1638.293,15.929, 3.5);//Aberto SetTimer("GateCloseLSPDGAR", 5000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo а Garagem do LSPD, o portгo irб se fechar em 5 Segundos"); return 1; } if (strcmp(cmdtext, "/LSPDEL1", true)==0) { MoveObject(EL1,1569.070,-1635.112,13.817, 3.5);//Encima MoveObject(EL1,1569.069,-1635.136,28.482, 3.5);//Embaixo SetTimer("EL1DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW, "Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); return 1; } if (strcmp(cmdtext, "/LSPDEL2", true)==0) { MoveObject(EL2,1568.493,-1666.246,28.660, 3.5);//Encima MoveObject(EL2,1568.466,-1666.350,41.350, 3.5);//Embaixo SetTimer("EL2DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); return 1; } if (strcmp(cmdtext, "/LSPDEL3", true)==0) { MoveObject(EL3,1573.717,-1685.977,41.382, 3.5);//Encima MoveObject(EL3,1573.691,-1685.959,28.746, 3.5);//Embaixo SetTimer("EL3DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); return 1; } return 0; } |
if ((PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1) && PlayerToPoint(15.0, playerid, 1539.670,-1628.510,15.928)
if(strcmp(cmdtext, "/lspdpor", true)==0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto SetTimer("GateCloseLSPDGATE", 5000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao LSPD, o portгo irб se fechar em 5 Segundos"); else { SendClientMessage(playerid,COLOR_YELLOW,"Voce tem que ser um Policial Militar para exercer este comando!"); } return 1; } if (strcmp(cmdtext, "/lspdgar", true)==0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(LSPDGAR,1586.284,-1638.433,15.964, 3.5);//Fechado MoveObject(LSPDGAR,1576.977,-1638.293,15.929, 3.5);//Aberto SetTimer("GateCloseLSPDGAR", 5000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo а Garagem do LSPD, o portгo irб se fechar em 5 Segundos"); else { SendClientMessage(playerid,COLOR_YELLOW,"Voce tem que ser um Policial Militar para exercer este comando!"); } return 1; } if (strcmp(cmdtext, "/LSPDEL1", true)==0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(EL1,1569.070,-1635.112,13.817, 3.5);//Encima MoveObject(EL1,1569.069,-1635.136,28.482, 3.5);//Embaixo SetTimer("EL1DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW, "Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); else { SendClientMessage(playerid,COLOR_YELLOW,"Voce tem que ser um Policial Militar para exercer este comando!"); } return 1; } if (strcmp(cmdtext, "/LSPDEL2", true)==0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(EL2,1568.493,-1666.246,28.660, 3.5);//Encima MoveObject(EL2,1568.466,-1666.350,41.350, 3.5);//Embaixo SetTimer("EL2DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); else { SendClientMessage(playerid,COLOR_YELLOW,"Voce tem que ser um Policial Militar para exercer este comando!"); } return 1; } if (strcmp(cmdtext, "/LSPDEL3", true)==0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { MoveObject(EL3,1573.717,-1685.977,41.382, 3.5);//Encima MoveObject(EL3,1573.691,-1685.959,28.746, 3.5);//Embaixo SetTimer("EL3DOWN", 9000, 0); SendClientMessage(playerid, COLOR_YELLOW,"Seja Bem Vindo ao Elevador do LSPD, ele irб subir/descer e voltar em 9 Segundos"); else { SendClientMessage(playerid,COLOR_YELLOW,"Voce tem que ser um Policial Militar para exercer este comando!"); } return 1; } return 0; } |
Originally Posted by [NoD
Gui ]
Se a policia no seu GM for [pMember] == 1 ficarб + - isso. Quote:
|
C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(162) : error 017: undefined symbol "PlayerInfo" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(162) : warning 215: expression has no effect C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(162) : error 001: expected token: ";", but found "]" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(162) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(162) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
new PlayerInfo[MAX_PLAYERS][pInfo];
Originally Posted by Caio_Cartaxo
tenta por isso ai no teu gm
pawn Code:
|
C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(14) : error 017: undefined symbol "pInfo" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(14) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(180) : error 017: undefined symbol "pMember" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(186) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(194) : error 017: undefined symbol "pMember" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(200) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(20 ![]() C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(214) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(222) : error 017: undefined symbol "pMember" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(22 ![]() C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(236) : error 017: undefined symbol "pMember" C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(242) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(250) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(250) : error 004: function "GateCloseLSPDGATE" is not implemented C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(256) : warning 225: unreachable code C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(256) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(256) : error 004: function "GateCloseLSPDGAR" is not implemented C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(262) : warning 225: unreachable code C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(262) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(262) : error 004: function "EL1DOWN" is not implemented C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(26 ![]() C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(26 ![]() C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(26 ![]() C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(274) : warning 225: unreachable code C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(274) : error 029: invalid expression, assumed zero C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(274) : error 004: function "EL3DOWN" is not implemented C:\Users\MARCAL\Desktop\GTA\filterscripts\NewLSPDv .0.2B.pwn(281) : error 030: compound statement not closed at the end of file (started at line 222) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 23 Errors. |
new Team[MAX_PLAYERS];
//OnGameModeInit SetTimer("CheckPos", 1000, true);
//Final do Script public CheckPos() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(Team[i] == 1) // Considerando que a equipe dos Cops й de ID 1 (modificar se necessбrio). { if(PlayerToPoint(3.0, i, X, Y, Z)) { // MoveObject.... Aqui vocк vai fazer seu portгo abrindo. } else { // MoveObject... Aqui vocк irб fazer seu portгo fechando, na posiзгo padrгo. } } } } return 1; }
[b]//Topo do Script: forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); //Final do script: public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; }