[Tutorial] How to create a simple announce cmd[sscanf|| Zcmd]
#21

Nice tutorial it's good
Reply
#22

@Jeth,
Thank you
Reply
#23

Code:
CMD:ann(playerid,params[])
{
   SendAdminText(playerid, "{00FF00}/ann", params);
   new text[60];
   if(sscanf(params, "s[60]",text))
   return SendClientMessage(playerid, 0xFF0000, "Usage:/ann [text]");
   GameTextForAll(text,3000,3);
   if(APlayerData[playerid][PlayerLevel] >= 1)
   return 1;
}
Code:
C:\Users\SRB\Desktop\serverffs\pawno\include\PPC_PlayerCommands.inc(5736) : warning 209: function "cmd_ann" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
can someone help
Reply
#24

I fixed it for you @SRB.

pawn Code:
CMD:ann(playerid,params[])
{
    new text[60];
    if(APlayerData[playerid][PlayerLevel] >= 1)//this needs to be at the top.
    if(sscanf(params,"s[60]",text))return SendClientMessage(playerid,0xFF0000,"Usage:/ann [text]");
    SendAdminText(playerid, "{00FF00}/ann", params);
    GameTextForAll(text,3000,3);
    return 1;
}
SendAdminText shows you're using PPC :P
Reply
#25

hehe thx
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)