new Pizza[MAX_PLAYERS];
if(strcmp(cmdtext, "/Pizza", true) == 0) // Comando ( Nгo Importa Vamos Usar o F ) { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875)) { if(Pizza[playerid] <= 7) {Pizza[playerid] ++; SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0); ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1); GivePlayerMoney(playerid, -500); } if(Pizza[playerid] = 7) { SendClientMessage(playerid, -1, " {F28CAA} [INFO] Vocк Ja Comeu o Maximo de Pizzas Permitidas"); } } }
Olб Mais uma Vez , teachers , bom , manoooo do ceu , pra mim ia da certo mais num deu , sabe quando vc vai desenhar , imagina aquela coisa foda , mais quando desenha sai pior que bosta? int , isso resume meu cmd '-'
Bom Eu Fiz um Sistema de Alimentos , e Queria que Enquanto fosse menor que 7 ele podesse comer , e quando fosse maior ou igual a 7 ele nao comesse olhem New Код:
new Pizza[MAX_PLAYERS]; Код:
if(strcmp(cmdtext, "/Pizza", true) == 0) // Comando ( Nгo Importa Vamos Usar o F ) { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875)) { if(Pizza[playerid] <= 7) {Pizza[playerid] ++; SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0); ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1); GivePlayerMoney(playerid, -500); } if(Pizza[playerid] = 7) { SendClientMessage(playerid, -1, " {F28CAA} [INFO] Vocк Ja Comeu o Maximo de Pizzas Permitidas"); } } } ScreenShot ![]() |
if(strcmp(cmdtext, "/Pizza", true) == 0) // Comando ( Nгo Importa Vamos Usar o F )
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875))
{
if(Pizza[playerid] < 7) // SE Pizza[playerid] for menor (<) que 7 vocк executa o comando abaixo.
{
Pizza[playerid] ++;
SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0);
ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1);
GivePlayerMoney(playerid, -500);
}
else // Se nгo, Vocк executa o comando abaixo
{
SendClientMessage(playerid, -1, " {F28CAA} [INFO] Vocк Ja Comeu o Maximo de Pizzas Permitidas");
}
}
return true;
}
if(strcmp(cmdtext, "/Pizza", true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875)) { if(Pizza[playerid] > 7) return SendClientMessage(playerid, -1, " {F28CAA} [INFO] Vocк Ja Comeu o Maximo de Pizzas Permitidas"); Pizza[playerid] ++; SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0); ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1); GivePlayerMoney(playerid, -500); } }
Код:
new Pizza[MAX_PLAYERS]; Код:
if(strcmp(cmdtext, "/Pizza", true) == 0) // Comando ( Nгo Importa Vamos Usar o F ) { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875)) { if(Pizza[playerid] <= 7) { Pizza[playerid] ++; SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0); ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1); GivePlayerMoney(playerid, -500); } if(Pizza[playerid] = 7) { SendClientMessage(playerid, -1, " {F28CAA} [INFO] Vocк Ja Comeu o Maximo de Pizzas Permitidas"); } } } |
if(Pizza[playerid] < 7) // Condiзгo para a pessoa se ela comeu menos de 7 pizzas { // Aqui dentro todas as funзхes para a pessoar "comer" a pizza. } else { // Aqui dentro um texto informando o porque nгo pode comer mais pizzas }
new Pizza[MAX_PLAYERS];
CMD:pizza(playerid){ if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.700683, -1723.753173, 13.546875)) return SendClientMessage(playerid, -1, "Vocк nгo estб no local"); if(Pizza[playerid] == 7) return SendClientMessage(playerid, -1, "Vocк atingiu o mбximo de pizzas"); Pizza[playerid] += 1; SetPlayerAttachedObject(playerid,1, 2703, 5, 0.1, 0.07, 0.04, 180.0, 0.0, 0.0, 1.0, 1.0, 1.0); ApplyAnimation(playerid, "VENDING", "VEND_Drink2_P", 4.1, 0, 1, 1, 1, 1, 1); GivePlayerMoney(playerid, -500); return 1;}