14.07.2012, 13:56
Like this?:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(admin,5,cmdtext);//admin command
dcmd(ram,3,cmdtext);//ram command
return 0;
}
dcmd_ram(playerid,params[])
{
new msg[200],targetid;
if(pInfo[playerid][Admin]< 1 || !IsPlayerAdmin(playerid))return SendClientMessage(playerid,-1,"You are not allowed to use this cmd");
if(sscanf(params,"us[120]",targetid,msg)) return SendClientMessage(playerid,-1,"Correct Usage : /ram [id] [message]");
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(msg,sizeof(msg),"[ADMIN] %s : %s",name,msg);
SendClientMessage(targetid,-1,msg);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(admin,5,cmdtext);//admin command
dcmd(ram,3,cmdtext);//ram command
return 0;
}
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(admin,5,cmdtext);//admin command
dcmd(ram,3,cmdtext);//ram command
return 0;
}
dcmd_ram(playerid,params[])
{
new msg[200],targetid;
if(pInfo[playerid][Admin]< 1 || !IsPlayerAdmin(playerid))return SendClientMessage(playerid,-1,"You are not allowed to use this cmd");
if(sscanf(params,"us[120]",targetid,msg)) return SendClientMessage(playerid,-1,"Correct Usage : /ram [id] [message]");
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(msg,sizeof(msg),"[ADMIN] %s : %s",name,msg);
SendClientMessage(targetid,-1,msg);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(admin,5,cmdtext);//admin command
dcmd(ram,3,cmdtext);//ram command
return 0;
}