[Ajuda] Tutorial - 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: [Ajuda] Tutorial (
/showthread.php?tid=551433)
Tutorial -
LucasDias - 18.12.2014
Olб galera da forum samp, estou criando uma gamemode com Dof2, zcmd, e sscanf, e queria perguntar se tem como eu criar um tutorial no " onplayerspawn " e verificar se ele for registrado nгo executar o tutorial, se nгo for registrado ele passa o tutorial.. se alguйm puder me dar uma ajuda agradeзo!!
Re: Tutorial -
humildadeforever - 18.12.2014
pawn Код:
//No Registro
SetPVarInt(playerid,"Registrado", 14);
//Na OnPlayerSpawn
if(GetPVarInt(playerid,"Registrado") == 14)
{
// inicia o tutorial
SendClientMessage(playerid, -1 "EAEEEE CARINHA NOVATO! TUDO BLZ?!");
}
//Ao terminar o tutorial
DeletePVar(playerid,"Registrado");
14 й o dia do meu aniversбrio :P
Leia isso: https://sampwiki.blast.hk/wiki/SetPVarInt
Re: Tutorial -
LucasDias - 18.12.2014
Obrigado pela ideia, vou fazer aqui e ver se fica tudo certo
Re: Tutorial -
humildadeforever - 19.12.2014
Quote:
Originally Posted by LucasDias
Obrigado pela ideia, vou fazer aqui e ver se fica tudo certo
|
De nada. Qualquer problema, tamo ae!
Re: Tutorial -
LucasDias - 19.12.2014
Quote:
Originally Posted by humildadeforever
pawn Код:
//Na OnPlayerSpawn if(GetPVarInt(playerid,"Registrado") == 14) { // inicia o tutorial SendClientMessage(playerid, -1 "EAEEEE CARINHA NOVATO! TUDO BLZ?!"); }
14 й o dia do meu aniversбrio :P
Leia isso: https://sampwiki.blast.hk/wiki/SetPVarInt
|
Ali onde ta a mensagem, como eu poderia colocar um timer? ex:
if(time = 10)
{
SendClientMessage(playerid, -1 "EAEEEE CARINHA NOVATO! TUDO BLZ?!");
}
como poderia fazer tipo um timer para ir passando as mensagens ali dentro?
Re: Tutorial -
Dolpin - 19.12.2014
Quote:
Originally Posted by LucasDias
Ali onde ta a mensagem, como eu poderia colocar um timer? ex:
if(time = 10)
{
SendClientMessage(playerid, -1 "EAEEEE CARINHA NOVATO! TUDO BLZ?!");
}
como poderia fazer tipo um timer para ir passando as mensagens ali dentro?
|
pawn Код:
forward Parte2(playerid);
public Parte2(playerid)
{
SetPVarInt(playerid, "Parte2", 15);
return 1;
}
SetPVarInt(playerid,"Registrado", 14);
//OnPlayerSpawn
if(GetPVarInt(playerid,"Registrado") == 14)
{
// inicia o tutorial
SendClientMessage(playerid, -1 "EAEEEE CARINHA NOVATO! TUDO BLZ?!");
SetTimerEx("Parte2", 20000, false, "i", playerid);
}
if(GetPVarInt(playerid, "Parte2") == 15)
{
SendClientMessage(playerid, -1, "Parte 2 do tutorial");
}
//fim do tutorial
DeletePVar(playerid,"Registrado");
DeletePVar(playerid, "Parte2");
Siga essa lуgica...