[Ajuda] Kit de armas
#1

como coloco uma mensagem para todos quando um player comprar um kit ex:

Fulano comprou KitRun(/kitrun)

pawn Код:
if(strcmp(cmd, "/kitrun", true) == 0) {
if(!IsPlayerSpawned(playerid)){return 1;}
if(IsPlayerInAnyVehicle(playerid)) {return SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Vocк deve sair de seu veнculo.");}
if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOUR_ERRO, StringTable[0]);
if(NoEvento[playerid] == 1 && EventoAtivo == 1) return SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Vocк estб em um evento. Para sair: /sair");
if(CallRemoteFunction("GetPlayerCash", "i", playerid) < 20000) return SendClientMessage(playerid, COLOUR_ERRO, "[ERRO]: Vocк nгo possui dinheiro o suficiente. Necessбrio: $20000");
CallRemoteFunction("GivePlayerCash", "ii", playerid, -20000);
GivePlayerWeapon(playerid, 22, 300);
GivePlayerWeapon(playerid, 28, 300);
GivePlayerWeapon(playerid, 26, 300);
SendClientMessage(playerid, COLOUR_AVISO, "");
SendClientMessage(playerid, COLOUR_INFORMACAO, "Vocк comprou um kit com armas Run por $20000");
SendClientMessage(playerid, COLOUR_INFORMACAO, "O kit serб vбlido atй vocк morrer ou entrar em uma ARENA DM.");
SendClientMessage(playerid, COLOUR_AVISO, "");
return 1;}
Reply
#2

https://sampwiki.blast.hk/wiki/SendClientMessageToAll
Reply
#3

adapte

new string[100]
format(sizeof, string(sizeof), "[INFO] %s Comprou Kit Tal.", Nome(playerid))
SendClientMessageToAll(COR_AQUI, string);
Reply
#4

Quote:
Originally Posted by BieeelEvolution
Посмотреть сообщение
adapte

new string[100]
format(sizeof, string(sizeof), "[INFO] %s Comprou Kit Tal.", Nome(playerid))
SendClientMessageToAll(COR_AQUI, string);
pawn Код:
C:\Users\Re\Desktop\SampServer\gamemodes\SFDM.pwn(4262) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#5

apague o new String[100];
Reply
#6

Quote:
Originally Posted by Lipe_Stronda
Посмотреть сообщение
apague o new String[100];
VLW!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)