SA-MP Forums Archive
Message not shown! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Message not shown! (/showthread.php?tid=419165)



Message not shown! - Shouty - 27.02.2013

It's me again.I have a problem.
I made a simple ban command.. but I have a bug.
It don's shows the ban message!

PHP код:
CMD:ban(playeridparams[])
{
new 
string[128], idname[25], admin[25], motiv[128];
GetPlayerName(playerid,admin,sizeof(admin));
GetPlayerName(id,name,sizeof(name));
if(
PlayerInfo[playerid][AdminLevel] < 3) return SendClientMessage(playerid,-1,"( ! ) Comanda necunoscuta!");
if(
sscanf(params,"us",id,motiv)) return SendClientMessage(playerid,-1,"{FF0000}Use : {FFFFFF}/ban <ID> <Motiv>");
if(!
IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"[BAN] Nu este On!");
format(string,sizeof(string),"( ! ) %s(ID:%d) a primit ban de la %s! Motiv:%s",name,id,admin,motiv);
SendClientMessageToAll(-1,string);
SendClientMessage(playerid,-1,"( ! ) Ai primit ban! Daca crezi ca ai fost nedreptatit fa o cerere unban pe {FF0000}SITE {FFFFFF}!");
Ban(id);
return 
1;




Re: Message not shown! - CrazyChoco - 27.02.2013

Due to kalcor changed the methoed to script in 0.3x. Use timer to display the message or to Ban the player


Re: Message not shown! - Shouty - 27.02.2013

I don't know how to make a Ban timer. Can you show me , please?


Re: Message not shown! - Djole1337 - 27.02.2013

pawn Код:
#define banEx(%1) \
    SetTimerEx("Ban_", 250, false, "i", (%1))

forward Ban_(playerid);
public Ban_(playerid)
{
    Ban(playerid);
}