Ajuda Stock -
JhowWatkins - 25.08.2016
Como posso executar a Stock em um comando COMANDO:
Quote:
CMD:colete3(playerid, params[]) {
SetPlayerKevlarHealth(strval(params), 300.0);
return 1;
}
|
STOCK:
PHP код:
stock SetPlayerKevlarHealth(playerid, Float:amount){
new id = CountAttachedObjects(playerid);
playerKevlarHealth[playerid] = amount;
haveKevlar[playerid] = true;
SetPlayerAttachedObject(playerid, id, 19142, 1, 0.1, 0.05, 0.0);
SetPlayerAttachedObjectEx(19142,Vaga_Colete,playerid,id);
SendClientMessage(playerid, 0xFFFFFFFF, "[Informaзгo] Voce colocou seu Colete!");
ColocarColete[playerid] = 1;
return 1;
}
Re: Ajuda Stock -
arakuta - 25.08.2016
A resposta jб estб no seu post.
PHP код:
stock Por10(param1)
{
print("Multipliquei.");
return param1 * 10;
}
PHP код:
CMD:5por10(playerid)
{
printf("5 vezes 10 й %d",Por10(5));
return 1;
}
PHP код:
stock MateTodos()
{
new a;
for(new i; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i,0.0);
a++;
}
}
return a;
}
PHP код:
CMD:morram(playerid)
{
new players = MateTodos();
printf("Matei %d players",players);
return 1;
}
Re: Ajuda Stock -
JhowWatkins - 25.08.2016
Quote:
Originally Posted by arakuta
A resposta jб estб no seu post.
PHP код:
stock Por10(param1)
{
print("Multipliquei.");
return param1 * 10;
}
PHP код:
CMD:5por10(playerid)
{
printf("5 vez 10 й %d",Por10(5));
return 1;
}
PHP код:
stock MateTodos()
{
new a;
for(new i; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i,0.0);
a++;
}
}
return a;
}
PHP код:
CMD:morram(playerid)
{
new players = MateTodos();
printf("Matei %d players",players);
return 1;
}
|
Qual parte?, mano й porque eu dou o comando e a Stock nгo funciona!
Re: Ajuda Stock -
arakuta - 25.08.2016
Faзa um debug, se achas que ela nгo estб sendo chamada.
Respuesta: Ajuda Stock -
SammyJ - 25.08.2016
PHP код:
CMD:colete3(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, -1, "Uso Correto: /colete3 [id]");
SetPlayerKevlarHealth(strval(params), 300.0);
return 1;
}
@edit
Se der algum erro referente ao isnull adicione este macro no topo em seu gm
pawn Код:
#if !defined isnull
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
Re: Respuesta: Ajuda Stock -
JhowWatkins - 25.08.2016
Quote:
Originally Posted by Glederson_dom
PHP код:
CMD:colete3(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, -1, "Uso Correto: /colete3 [id]");
SetPlayerKevlarHealth(strval(params), 300.0);
return 1;
}
@edit
Se der algum erro referente ao isnull adicione este macro no topo em seu gm
pawn Код:
#if !defined isnull #define isnull(%1) \ ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) #endif
|
nгo dб erro, porem nгo funciona...
Respuesta: Re: Respuesta: Ajuda Stock -
SammyJ - 25.08.2016
Quote:
Originally Posted by JhowWatkins
nгo dб erro, porem nгo funciona...
|
Faзa como o amigo disse! Faзa um debug no stock com print.
Seria ideal vocк usar crashdetect!
Re: Ajuda Stock -
JhowWatkins - 25.08.2016
Quote:
Originally Posted by arakuta
Faзa um debug, se achas que ela nгo estб sendo chamada.
|
Nгo sei fazer Debug... se puder me dar uma base
Re: Ajuda Stock -
arakuta - 25.08.2016
https://sampforum.blast.hk/showthread.php?tid=216163
Re: Ajuda Stock -
JhowWatkins - 25.08.2016
Quote:
Originally Posted by arakuta
|
Rapaz, nгo conseguir entender muito bem... nгo me expresso bem em leitura se tem algum jeito de falar comigo?, posso atй te pagar