[Ajuda] Guardar e devolver
#1

Estou tentando fazer um detector de metais que vi em um server qualquer por ai..
Mas nгo sei qual cуdigo tem a funзгo de pegar as armas e gravar elas para devolver as mesmas que foram retiradas
Se tiver permissгo de utilizar armas...

Enfim, Aqui esta minha tentativa que acabou resultando em 3 "ERROS"


pawn Код:
else if(PlayerToPoint(1.0, i, 1554.3798,-1675.6377,16.1953)) //dp entrada
            {
            SetPlayerInterior(i, 6);
            SetPlayerPos(i, 246.7872,62.8089,1003.6406);
            }
            else
            {
                if(GetPlayerWeapon(i) >= 24 || GetPlayerWeapon(i) <= 40)// Vi isto em um tуpico, nгo sei se funciona T.T
                SendClientMessage(i, COLOR_GREY, "Vocк passou no detector de metais e suas armas foram retiradas.");
                SendClientMessage(i, COLOR_GREY, "Caso vocк possua porte de armas elas serгo devolvidas.");
                ResetPlayerWeapons(i);
                }
            }
            else if(PlayerToPoint(1.0, i, 246.7872,62.8089,1003.6406)) //dp saida
            {
            SetPlayerInterior(i, 0);
            SetPlayerPos(i, 1551.3892,-1675.6689,15.8282);
            }
            else
            {
                if(PlayerInfo[i][pGunLic] != 1)
                {
                    SetPlayerInterior(i, 0);
                    SetPlayerPos(i, 1551.3892,-1675.6689,15.8282);
                    SetPlayerFacingAngle(i, 90.0);
                    SendClientMessage(i,COLOR_GREY, "Suas armas nгo foram devolvidas por que vocк nгo tem licenзa de armas!");
                    return 1;
                }
                else
                {
                    if(GetPlayerWeapon(i) >= 24 || GetPlayerWeapon(i) <= 40)// Vi isto em um tуpico, nгo sei se funciona T.T
                    SetPlayerInterior(i,0);
                    SetPlayerPos(i, 1551.3892,-1675.6689,15.8282);
                    SendClientMessage(i,COLOR_GREY, "Suas armas foram devolvidas por que vocк possui licenзa de armas.");
                }
            }
Ps: Ajudinha nos 3 erros ai.. xD
Reply
#2

posta ae as linhas do erro !
Reply
#3

C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(19876) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(20000) : warning 211: possibly unintended assignment
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(2177 : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(25202) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(25231) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(27885) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(27885) : warning 211: possibly unintended assignment
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(29879) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(35521) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(3555 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(35574) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(36585) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(40246) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49090) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(4911 : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49125) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49126) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49481) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49481) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49481) : warning 215: expression has no effect
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(49481) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(50060) : warning 209: function "CustomPickups" should return a value
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(50061) : error 010: invalid function or declaration
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(54607) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(5477 : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(54949) : warning 217: loose indentation
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(5825 : warning 235: public function lacks forward declaration (symbol "GuerraTerrorista")
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(56810) : warning 204: symbol is assigned a value that is never used: "GuerranoMateriala"
C:\Documents and Settings\Yury Roque\Desktop\**\Sa-mp Server\gamemodes\**.pwn(52136) : warning 204: symbol is assigned a value that is never used: "robbingg"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#4

....
Reply
#5

Poste a linha 58258 \ 56810 \ 52136
Reply
#6

identar o gm й bom....
Reply
#7

Estava aqui tentando atй agora...
Descobri que estava botando no lugar errado, entгo botei em "public OnPlayerKeyStateChange"
Mas nгo to conseguindo tirar 4 erros, acho que й de "chaves" quase certeza =/
Й que as entradas vгo se juntando em "else if" entгo puis este code no meio ai fico apenas "if" retirei o proximo "else" e assim fui tentado achar que chave adicionar ou retirar..

(Nгo tenho certeza se era o local errado, quando eu consegui copilar e fui testar... As mensagens repetiam freneticamente jб do inicio.. @.@ Ae tentei botar em "public OnPlayerKeyStateChange")
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)