help pls
#10

Quote:
Originally Posted by FrezQ
Посмотреть сообщение
PHP код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"You're not allowed to use this command"); 
This line is used for /asay, just I want clarify that how can you write that "You're not allowed to use this command"
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You're not allowed to use this command")

can be used like this too

PHP код:
CMD:test(playeridparams[])
{
   If(
IsPlayerAdmin(playerid))
   {
      
GivePlayerWeapon(playerid24200)
   }
   else if(!
IsPlayerAdmin(playerid))
   {
       
SendClientMessage(playeridCOLOR_WHITE"You're not allowed to use this command");
   } 
   return 
1;

Quote:
Originally Posted by lackmail
Посмотреть сообщение
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) 
{ 
    if(!success) 
    { 
        new string[128]; 
        format(string, sizeof(string), "{FF6600}[DBot]: {FFFFFF}Command {FF0000}%s{FFFFFF} not found, Type {FF6600}/cmds {FFFFFF}to see server commands", cmdtext); 
        SendClientMessage(playerid, COLOR_WHITE, string); 
    } 
    else if(success && !IsPlayerAdmin(playerid)) 
    { 
        lastcommand[playerid]=gettime(); 
    } 
    return 1; 
}
thanks man +rep

-Locked
Reply


Messages In This Thread
help pls - by DeStRoY232 - 20.10.2017, 11:12
Re: help pls - by DonaldDuck - 20.10.2017, 11:14
Re: help pls - by DeStRoY232 - 20.10.2017, 11:15
Re: help pls - by DonaldDuck - 20.10.2017, 11:18
Re: help pls - by DeStRoY232 - 20.10.2017, 11:19
Re: help pls - by DonaldDuck - 20.10.2017, 11:20
Re: help pls - by DeStRoY232 - 20.10.2017, 11:21
Re: help pls - by FrezQ - 20.10.2017, 11:29
Re: help pls - by FrezQ - 20.10.2017, 11:32
Re: help pls - by DeStRoY232 - 20.10.2017, 12:03

Forum Jump:


Users browsing this thread: 2 Guest(s)