[Ajuda] Agendamento de cadeia/Prisгo
#1

Adicionei um comando de "agendar cadeia e de prisгo" porem quando eu prendo,e o jogador sai e depois volta para o servidor,ele nгo da spawn no interior da cadeia,alguйm pode me ajudar? ele fica caindo do cйu.

PHP код:
    if(PlayerInfo[playerid][Abuser] == ){
    
LiberarPrisao(playerid);
    
SetPlayerPos(playerid223.5335,110.3779,999.0156);
    
SetPlayerInteriorplayerid,10);
    new 
CadeiaMotivo[128];
    new 
msg[128];
    
format(CadeiaMotivosizeof(CadeiaMotivo), "%s"dini_Get(file"MotivoPrisao"));
    
SendClientMessage(playerid0x1875CCAA,"=================================== Preso ===================================");
    
SendClientMessage(playerid0xFFFFFFAA,"» Vocк recebeu uma puniзгo de cadeia estando online / offline  por um admin!");
    
format(msg128"» Prisгo ( Motivo: %s )"CadeiaMotivo);
    
SendClientMessage(playerid0xFFFFFFAAmsg);
    
SendClientMessage(playerid0x1875CCAA,"=================================== Preso ===================================");
    } 
Agendamento de prisгo:

PHP код:
if( !strcmpcmd"/cadeiaoff"true ))
    {
    if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || guardiao[playerid]){
    {
    
tmp2 strtokcmdtextidx );
    if( !
strlentmp2 ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /CadeiaOff [Nick] [Tempo] [Motivo]" );
    return 
1;
    }
    
format(filesizeof(file ), "Contas/%s.ini"tmp2 );
    if( !
fexistfile ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Nгo existe nenhuma conta com esse nick !" );
    return 
1;
    }
    
tmp strtokcmdtextidx );
    if( ! 
strlentmp ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /CadeiaOff [Nick] [Tempo] [Motivo]" );
    return 
1;
    }
    new
    
iTempo strvaltmp )
    ;
    if( 
iTempo || iTempo 600 )
    {
    
SendClientMessageplayeridVermelho"| ERRO | Tempo somente de 1 а 600 minutos ! " );
    return 
1;
    }
    new 
length strlencmdtext );
    while (( 
idx length ) && ( cmdtextidx ] <= ' ' ))
    {
    
idx++;
    }
    new 
offset idx;
    new 
result64 ];
    while (( 
idx length ) && (( idx offset ) < ( sizeofresult ) - )) )
    {
    
resultidx offset ] = cmdtextidx ];
    
idx++;
    }
    
resultidx offset ] = EOS;
    if( !
strlenresult ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /CadeiaOff [Nick] [Tempo] [Motivo]" );
    return 
1;
    }
    new 
sistemacadeia[200];
    
format(sistemacadeiasizeof(sistemacadeia), "| ZS-Admin | O(A) %s %s agendou a prisгo do(a) jogador(a) %s por %d minutos ( Motivo: %s )"CargoAdmin(playerid), PlayerName(playerid), tmp2iTemporesult);
    
SendClientMessageToAll(0xB0FF30AAsistemacadeia);
    
dini_Set(file"MotivoPrisao"result);
    
dini_IntSetfile"Abuser");
    
dini_IntSetfile"pPreso"iTempo*60 );
    }
    }
    return 
1;
    } 
Comando /cadeia:

PHP код:
             if( !strcmpcmd"/cadeia"true ))
    {
    if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || guardiao[playerid]){
    {
    
tmp strtokcmdtextidx );
    if( !
strlentmp ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /Cadeia [ID] [Tempo] [Motivo]" );
    return 
1;
    }
    new
    
id strvaltmp )
    ;
    
tmp strtokcmdtextidx );
    if( !
strlentmp ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /Cadeia [ID] [Tempo] [Motivo]" );
    return 
1;
    }
    new
        
iTempo strvaltmp )
    ;
    if(
pAdmin[playerid] == 5)
    {
    if( 
iTempo || iTempo 3000 )
    {
    
SendClientMessageplayeridVermelho"| ERRO | Tempo somente de 1 а 3000 minutos !" );
    return 
1;
    }
    }
    else if(
pAdmin[playerid] == 4)
    {
    if( 
iTempo || iTempo 400 )
    {
    
SendClientMessageplayeridVermelho"| ERRO | Tempo somente de 1 а 400 minutos !" );
    return 
1;
    }
    }
    else if(
pAdmin[playerid] == 3)
    {
    if( 
iTempo || iTempo 200 )
    {
    
SendClientMessageplayeridVermelho"| ERRO | Tempo somente de 1 а 200 minutos !" );
    return 
1;
    }
    }
    else if(
pAdmin[playerid] == || pAdmin[playerid] == 2)
    {
    if( 
iTempo || iTempo 80 )
    {
    
SendClientMessageplayeridVermelho"| ERRO | Tempo somente de 1 а 80 minutos !" );
    return 
1;
    }
    }
    new 
length strlencmdtext );
    while (( 
idx length ) && ( cmdtextidx ] <= ' ' ))
    {
    
idx++;
    }
    new 
offset idx;
    new 
result64 ];
    while (( 
idx length ) && (( idx offset ) < ( sizeofresult ) - )) )
    {
    
resultidx offset ] = cmdtextidx ];
    
idx++;
    }
    
resultidx offset ] = EOS;
    if( !
strlenresult ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Digite: /Cadeia [ID] [Tempo] [Motivo]" );
    return 
1;
    }
    if( !
IsPlayerConnectedid ))
    {
    
SendClientMessageplayeridVermelho"| ERRO | Ninguйm online com esse ID !" );
    return 
1;
    }
    
GameTextForPlayerid"~w~~h~PRESO!"30000);
    
MensagemFormatadaAll0xB0FF30AA"| ZS-Admin | O(A) %s %s prendeu o(a) jogador(a) %s por %d minutos ( Motivo: %s )"CargoAdmin(playerid), PlayerNameplayerid ), PlayerNameid ), iTemporesult);
    
MensagemFormatada(id0xB0FF30AA"| CADEIA | Vocк ficarб preso por %d minutos!"iTempo );
    
format(filesizeof(file ), "Contas/%s.ini"PlayerNameid ));
    
dini_IntSet(file"Abuser");
    
dini_Set(file"MotivoPrisao"result);
    
SetPlayerWantedLevelid);
    
PlayerInfoid ][ pPreso ] = iTempo*60;
    
ResetPlayerWeaponsid );
    
SetPlayerInteriorid10 );
    
SetPlayerPos(id223.5335,110.3779,999.0156);
    
KillTimer(T_Preso[id]);
    
T_Presoid ] = SetTimerEx"LiberarPrisao"1000false"d"id );
    
PlayerInfo[playerid][Abuser] = 1;
    }
    }
    return 
1;
    } 
Reply
#2

De acordo com o seu cуdigo de cadeia, o interior й o 10 e nгo o 9 como vocк colocou.
Reply
#3

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
De acordo com o seu cуdigo de cadeia, o interior й o 10 e nгo o 9 como vocк colocou.
Assim,vdd,porem eu coloquei 10 e o msm erro ocorre.
Reply
#4

alguйm?!
Reply
#5

Essa funзгo LiberarPrisao й o quк?

No seu cуdigo de cadeia, vocк chama ela depois de colocar o jogador nas coordenadas, e no agendar, vocк chama ela antes.
Pode ser que seja isso!
Reply
#6

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Essa funзгo LiberarPrisao й o quк?

No seu cуdigo de cadeia, vocк chama ela depois de colocar o jogador nas coordenadas, e no agendar, vocк chama ela antes.
Pode ser que seja isso!
eu chamo ela,faзo td certo. Porem na hora de testar,ele apenas spawna errado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)