SA-MP Forums Archive
[Pedido] Sistema Fodгo! - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sistema Fodгo! (/showthread.php?tid=280159)



[Pedido] Sistema Fodгo! - marcos5680 - 30.08.2011

Eae pessoal! Eu to aquii fazendo um pedidos para voceis BEM COMPLICADO! Tomara que voceis me Ajudem:

Eu ja usei Search, mas nao encontrei nada que eu to querendo!
Intao eu queria tipo de um sistema de salvamento de DM de Armas,Vida e Colete! Exemplo:

Um player que ta com 100% de vida e 27% de colete e 5 armas! Digita /X1... Ai quando ele digita /X1 automaticamente Salva o colete a vida e as armas que ele estava... Ai quando ele sai do X1 a vida o colete e as armas que ele tava, voltam pra ele! Mas se no caso ele morrer no X1, ele perdera as armas vida e colete concerteza!

Entao galerinha, й desse jeito que eu queria espero que possam me ajudar... Se nao entenderam manda uma mensagem que explicarei mas Detalhado


Re: [Pedido] Sistema Fodгo! - Bruno Pereira - 30.08.2011

Search:
https://sampforum.blast.hk/showthread.php?tid=277245

Estude e adapte.


Re: [Pedido] Sistema Fodгo! - Shadoww5 - 30.08.2011

E como que ele vai sair do X1 ?


Re: [Pedido] Sistema Fodгo! - JonathanFeitosa - 30.08.2011

https://sampwiki.blast.hk/wiki/GetPlayerArmour
https://sampwiki.blast.hk/wiki/GetPlayerHealth


Respuesta: Re: [Pedido] Sistema Fodгo! - marcos5680 - 30.08.2011

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
E como que ele vai sair do X1 ?
Eu digito /Sair


Respuesta: [Pedido] Sistema Fodгo! - marcos5680 - 30.08.2011

nimguem consegue me ajuda ai?


Re: [Pedido] Sistema Fodгo! - trollv - 30.08.2011

pawn Код:
new Conta[MAX_PLAYERS][DATA];
enum Data
{
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}

OnPlayerCommandText
{
if (strcmp(cmd, "/x1", true) == 0)
{
    SavePlayerData(playerid);
}
if (strcmp(cmd, "/sair", true) == 0)
{
    LoadPlayerData(playerid);
}
}

forward public SavePlayerData(playerid);
public SavePlayerData(playerid)
{
    new Float: health, Float: armour, Float: SX, Float: SY, Float: SZ, Float:ang;
    GetPlayerHealth(playerid, health);
    GetPlayerArmour(playerid, armour);
    GetPlayerPos(playerid, SX, SY, SZ);
    GetPlayerFacingAngle(playerid, ang);
    //
    Conta[playerid][saved_money] = GetPlayerMoney(playerid);
    Conta[playerid][saved_skin] = GetPlayerSkin(playerid);
    Conta[playerid][saved_health] = health;
    if (armour > 0) Conta[playerid][saved_armour] = armour;
    Conta[playerid][saved_X] = SX;
    Conta[playerid][saved_Y] = SY;
    Conta[playerid][saved_Z] = SZ;
    Conta[playerid][saved_ang] = ang;
    Conta[playerid][saved_int] = GetPlayerInterior(playerid);
}
forward public LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
    SetPlayerHealth(playerid, Conta[playerid][saved_health]);
    if (Conta[playerid][saved_armour] > 0) SetPlayerArmour(playerid, Conta[playerid][saved_armour]);
    GivePlayerMoney(playerid, Conta[playerid][saved_money]-GetPlayerMoney(playerid));
    SetPlayerSkin(playerid, Conta[playerid][saved_skin]);
    SetPlayerPos(playerid, Conta[playerid][saved_X], Conta[playerid][saved_Y], Conta[playerid][saved_Z]);
    SetPlayerFacingAngle(playerid, Conta[playerid][saved_ang]);
    SetPlayerInterior(playerid, Conta[playerid][saved_int]);
}
Mais de mгo beijada do que isso, impossible


Re: [Pedido] Sistema Fodгo! - [BEP]AcerPilot - 30.08.2011

Nгo й forward public, apenas forward..


Re: [Pedido] Sistema Fodгo! - trollv - 30.08.2011

Quote:
Originally Posted by [BEP]AcerPilot
Посмотреть сообщение
Nгo й forward public, apenas forward..
Qualquer 1 dos 2 da certo, eu me acostumei assim, rs


Re: [Pedido] Sistema Fodгo! - [BEP]AcerPilot - 30.08.2011

Hum, vocк estб certo, desculpe, nгo lembrava mais disto


Re: [Pedido] Sistema Fodгo! - dPlaYer_ - 31.08.2011

Mano . Se eu nao me engano o Muca 1.6 tem isso .. vocк sai e volta , ex: quando vc entra em algum pickup criado As Armas Sao removidas , Quando sai , elas votam ..


Respuesta: Re: [Pedido] Sistema Fodгo! - marcos5680 - 31.08.2011

Quote:
Originally Posted by trollv
Посмотреть сообщение
pawn Код:
new Conta[MAX_PLAYERS][DATA];
enum Data
{
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}

OnPlayerCommandText
{
if (strcmp(cmd, "/x1", true) == 0)
{
    SavePlayerData(playerid);
}
if (strcmp(cmd, "/sair", true) == 0)
{
    LoadPlayerData(playerid);
}
}

forward public SavePlayerData(playerid);
public SavePlayerData(playerid)
{
    new Float: health, Float: armour, Float: SX, Float: SY, Float: SZ, Float:ang;
    GetPlayerHealth(playerid, health);
    GetPlayerArmour(playerid, armour);
    GetPlayerPos(playerid, SX, SY, SZ);
    GetPlayerFacingAngle(playerid, ang);
    //
    Conta[playerid][saved_money] = GetPlayerMoney(playerid);
    Conta[playerid][saved_skin] = GetPlayerSkin(playerid);
    Conta[playerid][saved_health] = health;
    if (armour > 0) Conta[playerid][saved_armour] = armour;
    Conta[playerid][saved_X] = SX;
    Conta[playerid][saved_Y] = SY;
    Conta[playerid][saved_Z] = SZ;
    Conta[playerid][saved_ang] = ang;
    Conta[playerid][saved_int] = GetPlayerInterior(playerid);
}
forward public LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
    SetPlayerHealth(playerid, Conta[playerid][saved_health]);
    if (Conta[playerid][saved_armour] > 0) SetPlayerArmour(playerid, Conta[playerid][saved_armour]);
    GivePlayerMoney(playerid, Conta[playerid][saved_money]-GetPlayerMoney(playerid));
    SetPlayerSkin(playerid, Conta[playerid][saved_skin]);
    SetPlayerPos(playerid, Conta[playerid][saved_X], Conta[playerid][saved_Y], Conta[playerid][saved_Z]);
    SetPlayerFacingAngle(playerid, Conta[playerid][saved_ang]);
    SetPlayerInterior(playerid, Conta[playerid][saved_int]);
}
Mais de mгo beijada do que isso, impossible
Deus esses 6 Erros!

Код:
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 017: undefined symbol "DATA"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5547) : error 017: undefined symbol "saved_money"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5548) : error 017: undefined symbol "saved_skin"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5549) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5550) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5551) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5552) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5553) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5554) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5555) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5559) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5561) : error 017: undefined symbol "saved_money"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5562) : error 017: undefined symbol "saved_skin"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5564) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5565) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: [Pedido] Sistema Fodгo! - trollv - 01.09.2011

Bota o

new Conta[MAX_PLAYERS][DATA];

depois do enum e adiciona dentro do mesmo saved_money e saved_skin fica assim:

pawn Код:
enum Data
{
    saved_money,
    saved_skin,
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}
new Conta[MAX_PLAYERS][DATA];
Mals pelo erro, fiz correndo e nem reparei que faltava isso, rs


Re: [Pedido] Sistema Fodгo! - [S]trong - 01.09.2011

Na verdade, nem й necessбrio o uso de forward.

Eai troll, sho aqui




Respuesta: Re: [Pedido] Sistema Fodгo! - marcos5680 - 01.09.2011

Quote:
Originally Posted by trollv
Посмотреть сообщение
Bota o

new Conta[MAX_PLAYERS][DATA];

depois do enum e adiciona dentro do mesmo saved_money e saved_skin fica assim:

pawn Код:
enum Data
{
    saved_money,
    saved_skin,
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}
new Conta[MAX_PLAYERS][DATA];
Mals pelo erro, fiz correndo e nem reparei que faltava isso, rs
Certo! Mas agora deu mas Erros, veja:

Код:
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 017: undefined symbol "DATA"
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5554) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5555) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5556) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5557) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5558) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5559) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5561) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5562) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5566) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5567) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5567) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5568) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5569) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5571) : warning 213: tag mismatch
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5572) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: [Pedido] Sistema Fodгo! - Dolby - 01.09.2011

pawn Код:
enum Data
{
    saved_money,
    saved_skin,
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}
new Conta[MAX_PLAYERS][Data];



Re: [Pedido] Sistema Fodгo! - [R] ousenber [K] - 01.09.2011

Passa uma dessas linhas "tag mismatch'


Respuesta: Re: [Pedido] Sistema Fodгo! - marcos5680 - 02.09.2011

Quote:
Originally Posted by Gustavo_Araujo
Посмотреть сообщение
pawn Код:
enum Data
{
    saved_money,
    saved_skin,
    Float:saved_armour,
    Float:saved_health,
    Float:saved_X,      
    Float:saved_Y,      
    Float:saved_Z,      
    Float:saved_ang,
    saved_int
}
new Conta[MAX_PLAYERS][Data];
SHUASA! MUITO BOM GUSTAVO! EU CONSEGUI FAZE FUNFA! MAS NAO SALVA AS ARMASS! VOCE ESQUECEU DE COLOKA PRA SALVA A ARMA BOTA AE PRA MIM, PQ EU SO TO INDO PRO NIVEL INTERMEDIARIO


Respuesta: [Pedido] Sistema Fodгo! - marcos5680 - 02.09.2011

ajudinha ae pessoal eu to loko por isso! falta sу fazer salvar a Armaa!


Respuesta: [Pedido] Sistema Fodгo! - marcos5680 - 05.09.2011

affs! nimguem sabe