[AJUDA] Poder usar comando sу dps de um tempo
#1

Tipo, o cara digita /arena, dai dps disso ele sу pode usar o /arena dnv dps de 60 segundos, tem como isso?
Reply
#2

Comando "/arena":


pawn Код:
if(GetPVarInt(playerid, "1time") == 1) return SendClientMessage(playerid, cor, "so uma vez por cada vida."); //Inicio do comando

SetPVarInt(playerid, "1time", 1); //Fim do comando, apуs as coisas.


OnPlayerDeath:

pawn Код:
SetPVarInt(playerid, "1time", 0);


OnPlayerDisconnect:

pawn Код:
DeletePVar(playerid, "1time");


OnGameModeExit:

pawn Код:
for(new i = 0; i < GetMaxPlayers(); i++)
{
    DeletePVar(i, "1time");
}
Reply
#3

ow
Код:
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(43) : error 017: undefined symbol "DeletePVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(81) : warning 217: loose indentation
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(97) : error 017: undefined symbol "DeletePVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(108) : error 017: undefined symbol "SetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(109) : warning 217: loose indentation
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(140) : error 017: undefined symbol "GetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(140) : error 017: undefined symbol "cor"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(141) : error 017: undefined symbol "SetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~1\FILTER~1\AVASTA~1.PWN(145) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#4

Download -> http://files.sa-mp.com/samp03asvr_R7_win32.zip

Altera "cor" para uma cor definida no teu gamemode.

Se usares o 0.2x amanhг passo por aqui e posto. Agora vou dormir.

Edit:

@loose identation -> Organiza o teu cуdigo.
Reply
#5

tipo, to fazendo no FS
Reply
#6

Й a mesma coisa. Altera o que eu disse do OnGameModeExit para OnFilterScriptExit.
Reply
#7

Ja troquei pra ppasta q tu mandou eu baixa, mas os erros ainda continuam


Код:
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(73) : warning 217: loose indentation
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(80) : error 017: undefined symbol "DeletePVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(82) : warning 217: loose indentation
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(98) : error 017: undefined symbol "DeletePVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(109) : error 017: undefined symbol "SetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(110) : warning 217: loose indentation
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(141) : error 017: undefined symbol "GetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(142) : error 017: undefined symbol "SetPVarInt"
C:\DOCUME~1\User\Desktop\SAMPSE~2\FILTER~1\AVASTA~1.PWN(146) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#8

Compila com o novo pawno que eu te indiquei no link.

Corrigi o erro no DeletePVar. Vai lб acima ver no meu post. Enjoy.

Quote:
Originally Posted by Braian0808
sim cara, mais lб tah dando erro
Agora jб nгo estб dando erro, e quando estava dando erro esperavas eu responder com a correcзгo.
Reply
#9

agr sу da 2 erros

Код:
C:\Documents and Settings\User\Desktop\Samp Server\filterscripts\avastarena.pwn(43) : error 017: undefined symbol "DeletePVarInt"
C:\Documents and Settings\User\Desktop\Samp Server\filterscripts\avastarena.pwn(81) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\Samp Server\filterscripts\avastarena.pwn(97) : error 017: undefined symbol "DeletePVarInt"
C:\Documents and Settings\User\Desktop\Samp Server\filterscripts\avastarena.pwn(109) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\Samp Server\filterscripts\avastarena.pwn(145) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#10

Se queres aprender, aprende a ler.

Eu disse que os erros com o DeletePVar foram corrigidos no meu post lб em cima.

Altera DeletePVarInt para DeletePVar em ambos os casos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)