[AJUDA] script olha ai pois num sei explicar
#1

pessoal

tem algum script que quando a pessoa sai do servido , e ela reloga

ela volta pro local que saiu ??




tipow ela nasce no local onde ela deslogou da ultima ves


?

Expirion Games. Gm feito do zero
Players: 13 / 20
GameMode: Brasil Novo GM. nunca visto
MapName: San Andreas
Senha: Nгo
Reply
#2

PHP код:
#include <Dini> //BAIXE A INCLUDE E COLOCA NA PASTA PAWN/INCLUDE
new Pos[3];
new 
Spawn[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
    if(
Spawn[playerid] == 0)
    {
        new 
save[31],name[MAX_PLAYER_NAME],Float:x,Float:y,Float:Z;
        
GetPlayerName(playerid,name,sizeof(name));
        
format(save,sizeof(save),"Conta %s",name);
        if(
fexist(save))
        {
            
dini_Get(save,"PosicaoX");
            
dini_Get(save,"PosicaoY");
            
dini_Get(save,"PosicaoZ");
            
SetPlayerPos(playerid,x,y,z);
            
SendClientMessage(playerid0xFFFFFFFF,"Vocк voltou ao local que vocк estava antes de deslogar.");
            
Spawn[playerid] = 1;
        }
        else
        {
            
dini_Create(save);
        }
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
save[31],name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,sizeof(name));
    
format(save,sizeof(save),"Conta %s",name);
    
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
    if(
fexist(save))
    {
        
dini_FloatSet(save,"PosicaoX",Pos[0]);
        
dini_FloatSet(save,"PosicaoY",Pos[1]);
        
dini_FloatSet(save,"PosicaoZ",Pos[2]);
        return 
1;
    }
    return 
1;

Fiz agora, caso tenha algum erro, peзo que me digam.
Reply
#3

Funcionou ?
Reply
#4

Quote:

C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(22) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(213) : error 017: undefined symbol "fexist"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(234) : error 017: undefined symbol "fopen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(234) : warning 213: tag mismatch
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(235) : error 017: undefined symbol "fopen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(235) : warning 213: tag mismatch
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(237) : error 017: undefined symbol "fread"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(239) : error 017: undefined symbol "format"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(239) : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(239) : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(239) : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(240) : error 017: undefined symbol "fwrite"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(242) : error 017: undefined symbol "fclose"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(243) : error 017: undefined symbol "fclose"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(235) : warning 204: symbol is assigned a value that is never used: "nhnd"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(234) : warning 204: symbol is assigned a value that is never used: "ohnd"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(269) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(28 : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(289) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(289) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(342) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(356) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(357) : error 017: undefined symbol "strcmp"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(355) : warning 203: symbol is never used: "ignorecase"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(453) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(454) : error 017: undefined symbol "tolower"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\dutils.inc(456) : error 017: undefined symbol "strlen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(39) : error 017: undefined symbol "fexist"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(40) : error 017: undefined symbol "fopen"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(40) : warning 213: tag mismatch
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(41) : error 017: undefined symbol "fclose"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(40) : warning 204: symbol is assigned a value that is never used: "fhnd"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(4 : error 017: undefined symbol "strfind"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(49) : error 017: undefined symbol "strfind"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(6 : error 017: undefined symbol "format"
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(6 : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(6 : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(6 : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\pawno\include\Dini.inc(69) : error 017: undefined symbol "fopen"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Aparece estes erros
Reply
#5

Isto deve ter sido causado porque deve estar faltando alguma chave no seu GM.

Geralmente й isto que causa 26 erros. Procura a ultima modificaзгo que vocк fez e ajeita.
Reply
#6

Meti Em FS ou seja fiz nevv apaguei tudo e meti isso
Reply
#7

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
PHP код:
#include <Dini> //BAIXE A INCLUDE E COLOCA NA PASTA PAWN/INCLUDE
new Pos[3];
new 
Spawn[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
    if(
Spawn[playerid] == 0)
    {
        new 
save[31],name[MAX_PLAYER_NAME],Float:x,Float:y,Float:Z;
        
GetPlayerName(playerid,name,sizeof(name));
        
format(save,sizeof(save),"Conta %s",name);
        if(
fexist(save))
        {
            
diniGet(save,"PosicaoX");
            
diniGet(save,"PosicaoY");
            
diniGet(save,"PosicaoZ");
            
SetPlayerPos(playerid,x,y,z);
            
SendClientMessage(playerid0xFFFFFFFF,"Vocк voltou ao local que vocк estava antes de deslogar.");
            
Spawn[playerid] = 1;
        }
        else
        {
            
dini_Create(save);
        }
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
save[31],name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,sizeof(name));
    
format(save,sizeof(save),"Conta %s",name);
    
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
    if(
fexist(save))
    {
        
dini_FloatSet(save,"PosicaoX",Pos[0]);
        
dini_FloatSet(save,"PosicaoY",Pos[1]);
        
dini_FloatSet(save,"PosicaoZ",Pos[2]);
        return 
1;
    }
    return 
1;

Fiz agora, caso tenha algum erro, peзo que me digam.
x = dini_Get(save,"PosicaoX");
y = dini_Get(save,"PosicaoY");
z = dini_Get(save,"PosicaoZ");
Reply
#8

Codigo corrigido.
Reply
#9

Eu faзo new pawn e copio isso e dame 26 erros, e ja corregi .

x = dini_Get(save,"PosicaoX");
y = dini_Get(save,"PosicaoY");
z = dini_Get(save,"PosicaoZ");

Porque ?
Reply
#10

talvez a falta da include dini?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)