Just need an idea
#1

I'm working on a PM messaging CMD. i want to make /pmblock <playerid> cmd. Just need an idea how can i make such a cmd? i have /dnd which block all players pms, but I want to make it for a specific player. Any ideas will be appreciated!
Reply
#2

you can make a variable to be set on someone, and when he tries to use that command and the variable will be on 1, a message will appear instead of executing commands.
I hope you understand what I meant.
Reply
#3

PHP код:
new Playerblock[MAX_PLAYER][MAX_PLAYER] 
When someone performs the /block [id], set it like..

PHP код:
PlayerBlock[playerid][target] = 1; 
Then do a check when someone does /pm if the variable between THE TARGET first then him equal to 1 then don't send the message..

Example:

PHP код:
cmd:pm(playerid, params[])
{   
     new 
target;
     if(
sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "/pm [target]");
     if(
Playerblock[target][playerid]) return SendClientMessage(playerid, -1, "The player is blocking you");
} 
Reply
#4

Quote:
Originally Posted by Florin48
Посмотреть сообщение
you can make a variable to be set on someone, and when he tries to use that command and the variable will be on 1, a message will appear instead of executing commands.
I hope you understand what I meant.
Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
PHP код:
new Playerblock[MAX_PLAYER][MAX_PLAYER] 
When someone performs the /block [id], set it like..

PHP код:
PlayerBlock[playerid][target] = 1; 
Then do a check when someone does /pm if the variable between THE TARGET first then him equal to 1 then don't send the message..

Example:

PHP код:
cmd:pm(playerid, params[])
{   
     new 
target;
     if(
sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "/pm [target]");
     if(
Playerblock[target][playerid]) return SendClientMessage(playerid, -1, "The player is blocking you");
} 
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)