[Ajuda] Sistema cifrгo - 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] Sistema cifrгo (
/showthread.php?tid=477596)
Sistema cifrгo -
lekinho911 - 24.11.2013
Eu estou querendo fazer um sistema de cifrгo mais ou menos assim, UM TAL CARGO PODE PEGAR A GRANA EM TAL LUGAR EM 10 E 10 MINUTOS... Tem algum tutorial disso aн ? ou algum fundamento ?
Re: Sistema cifrгo -
DannielCooper - 24.11.2013
sу uma base...
pawn Код:
// Topo do GM
new bool:PodePegar[MAX_PLAYERS] = 1;
// em ongamemodeinit, #LOGICO
public OnGameModeInit()
{
SetTimer("DannielCooper", 1000000);
return 1;
}
// dentro do cmd, ou seila como qeira fazer.
if(PlayerInfo[playerid][/*Var do Cargo */] >= /* numero do cargo */)
{
if(ProxDetector(30.0, /* X, Y, Z*/);
{
if(Grana == 1)
{
GivePlayerMoney(playerid, 10000);
SendClientMessage(playerid, "vocк й cargo blablabla e pegou 10k!");
}
else
{
SendClientMessage(playerid, "espere 10 minutos para pegar a grana!");
return 1;
}
}
// final do gm
forward DannielCooper(playerid);
public DannielCooper(playerid)
{
Grana == 1;
return 1;
}
#Edit
thanks tugamars
Re: Sistema cifrгo -
Tugamars - 24.11.2013
Quote:
Originally Posted by DannielCooper
sу uma base...
pawn Код:
SetPlayerMoney(playerid, 10000);
|
Nгo devia ser GivePlayerMoney ? O Set nгo irб fazer com que se ele tiver 50k fique com 10k e perca os 40 ?
Re: Sistema cifrгo -
lekinho911 - 24.11.2013
Sу uma base nгo isso, foi tudo que eu pedi vlw
mas ai se eu quisesse por pra ter que aperta o "F" pra pegar o dinhero em um Pickup ?
Re: Sistema cifrгo -
DannielCooper - 24.11.2013
fiz com a tecla H, porque nao lembro a F.
pawn Код:
if((newkeys == KEY_HORN))
{
if(ProxDetector(30.0, /* X, Y, Z*/);
{
// resto do code
Re: Sistema cifrгo -
Tugamars - 24.11.2013
Acho que F й essa :.
Lista :
https://sampwiki.blast.hk/wiki/Keys