[PEDIDO]Sistema de Prisгo PF -
Nake01 - 03.09.2011
Olб galera, pesquisei aqui no forum mais nгo achei o sistema de prisгo que eu estou querendo, vou dizer para vocкs como й.
Eu queria um que eu prende-se o cara por tantos segundos ex: 50 segundos, mais quando o player morresse ou sai-se do server estes segundos salva-se e quando ele loga-se iria pra prisгo e os segundos continuariam correndo de onde pararгo, porfavor se alguem poder me ajudar agradeзo muto, preciso muito desse sistema para meu server !
Obrigado a todos !
No Aguardo !
Re: [PEDIDO]Sistema de Prisгo PF -
Pharrel - 03.09.2011
Posta o modo de salvamento das contas do seu servidor.
Re: [PEDIDO]Sistema de Prisгo PF -
Nake01 - 03.09.2011
OnPlayerDisconnect
Код:
dini_IntSet(file,"Cocaina", Cocaina[playerid]);
dini_IntSet(file,"Maconha", Maconha[playerid]);
Dialog de Login
Код:
Cocaina[playerid] = dini_Int(file, "Cocaina");
Maconha[playerid] = dini_Int(file, "Maconha");
Re: [PEDIDO]Sistema de Prisгo PF -
Pharrel - 03.09.2011
pawn Код:
//OnGameModeInit
SetTimer("ReduzirTempoPrisao", 1000, true);
//OnPlayerDeath
JailPlayer(playerid);
//OnPlayerSpawn
JailPlayer(playerid);
//OnPlayerLogin
Preso[playerid] = dini_Int(file, "TempoPrisao");
JailPlayer(playerid);//ISSO TEM Q FICAR DEPOIS DE CARREGAR TUDO DAS CONTAS!!!!!!!!!!!!!!!!!!!1
//OnPlayerDisconect
dini_IntSet(file,"TempoPrisao", Preso[playerid]);
forward JailPlayer(playerid);
public JailPlayer(playerid)
{
if(Preso[playerid] > 0)
{
SetPlayerPos(/*COLOCA A POSIЗГO Q VC QUER Q O PRESO FIQUE*/);
SetPlayerInterior(/*INTERIOR DO LOCAL*/);
Preso[playerid] = /*TEMPO EM SEGUNDOS QUE VC QUER Q ELE FIQUE PRESO*/);
SendClientMessage(i, COR, "Ta preso...;D");
}
}
//FIM DO GM
forward ReduzirTempoPrisao();
public ReduzirTempoPrisao()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Preso[i] > 0)
{
Preso[i]--;
if(Preso[i] == 0)
{
SetPlayerPos(i, /*LOCAL PARA ELE FICAR FORA DA PRISAO*/);
SetPlayerInterior(/*INTERIOR DO LOCAL SE FOR DIFERENTE DO Q JA TA*/);
SendClientMessage(i, COR, "Saiu da prisao, bora assaltar pra comemorar :D");
}
}
}
return 1;
}
Fiz o codigo do 0 entao posso ter esquecido algo...
Re: [PEDIDO]Sistema de Prisгo PF -
[AF]Junior - 03.09.2011
Do 0? Acho que isso me cheira GF.
Re: [PEDIDO]Sistema de Prisгo PF -
Pharrel - 03.09.2011
quer q eu filme eu dando ctrl + z no comando?
Re: [PEDIDO]Sistema de Prisгo PF -
[AF]Junior - 03.09.2011
Quero.
Re: [PEDIDO]Sistema de Prisгo PF -
Pharrel - 03.09.2011
http://*********/LW9uYsNEZvc
ok...agora me chupa.
Re: [PEDIDO]Sistema de Prisгo PF -
Nake01 - 03.09.2011
Mano uma dъvida ali onde vocк colocou
Код:
Preso[playerid] = /*TEMPO EM SEGUNDOS QUE VC QUER Q ELE FIQUE PRESO*/);
Tipo assim nгo seria o tempo que eu coloca-se pro player no /prender ?
Re: [PEDIDO]Sistema de Prisгo PF -
StrondA_ - 04.09.2011
Quote:
Originally Posted by [AF]Junior
Quero.
|
Nгo ajuda, e fica colocando defeito!