PM ADV BAN [HELP]
#3

Care to fix the indentation and re-writing it from scratch?

Use this: https://sampforum.blast.hk/showthread.php?tid=568668 (use any other function)
and look at my code as a example of a good code.

EXAMPLE
PHP код:
CMD:pm(playeridparams[])
{
    new 
targetidmsg[75]; // 75 is enough
    
if(sscanf(params"us[75]"targetidmsg)) return SendClientMessage(playerid, -1"ERROR");
    if(
targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1"ERORR"); // faster than IsPlayerConnected
    
if(targetid == /* Blocking PM */) return SendClientMessage(playerid, -1"ERROR");
    if(
IsAdv(msg)) return SendClientMessage(playerid, -1"ERROR"); // use Anti Adv function here
    
new string[75 MAX_PLAYER_NAME 1]; // 75 + 24 + 1 = 100 (75 for the msg, 24 for the name, 1 for the null)
    
format(stringsizeof string"%s"your function);
    
SendClientMessage(playerid, -1string);
    
format(stringsizeof string"%s"your function);
    
SendClientMessage(targetid, -1string);
    return 
1;

Reply


Messages In This Thread
PM ADV BAN [HELP] - by RyderX - 06.12.2016, 17:26
Re: PM ADV BAN [HELP] - by Yaa - 06.12.2016, 17:36
Re: PM ADV BAN [HELP] - by Logic_ - 06.12.2016, 17:43
Re: PM ADV BAN [HELP] - by Bolex_ - 06.12.2016, 17:44
Re: PM ADV BAN [HELP] - by Yaa - 06.12.2016, 17:47
Re: PM ADV BAN [HELP] - by iLearner - 06.12.2016, 18:10
Re: PM ADV BAN [HELP] - by RyderX - 08.12.2016, 18:35

Forum Jump:


Users browsing this thread: 2 Guest(s)