CMD:o(playerid, params[])
{
new string[128];
if((noooc) && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "The OOC channel has been disabled by an Admin !");
if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(params)) return SendClientMessage(playerid, COLOR_CMD, "USAGE: (/o)oc [text]");
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
OOCOff(COLOR_OOC,string);
printf("%s", string);
return CMD_ooc(playerid, params);
}
error 017: undefined symbol "CMD_ooc"
return CMD_ooc(playerid, params);
CMD:oc(playerid,params[]) return cmd_ooc(playerid,params[]);
CMD:o(playerid, params[])
{
new string[128];
if((noooc) && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "The OOC channel has been disabled by an Admin !");
if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(params)) return SendClientMessage(playerid, COLOR_CMD, "USAGE: (/o)oc [text]");
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
OOCOff(COLOR_OOC,string);
printf("%s", string);
return 1;
}
If you wanna make multiple commands be the same just do;
pawn Код:
|
CMD:o(playerid,params[]) return cmd_ooc(playerid,params[]);
CMD:ad(playerid, params[])
{
new payout = idx * 25;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params, "s[64]", result)) return SendClientMessage(playerid, COLOR_CMD, "USAGE: (/ad)vertise [text]");
if((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "Please try again later %d seconds between Advertisements !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
format(string, sizeof(string), "Advertisement: %s, Contact: %s Ph: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Paid %s~n~~w~Message contained: %d Characters", FormatMoney(payout), idx);
GameTextForPlayer(playerid, string, 5000, 5);
if(PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
return CMD_advertise(playerid, params);
}
CMD:advertise(playerid,params[]) return cmd_ad(playerid,params[]);
CMD:ad(playerid, params[])
{
new payout = idx * 25;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params, "s[64]", result)) return SendClientMessage(playerid, COLOR_CMD, "USAGE: (/ad)vertise [text]");
if((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "Please try again later %d seconds between Advertisements !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
format(string, sizeof(string), "Advertisement: %s, Contact: %s Ph: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Paid %s~n~~w~Message contained: %d Characters", FormatMoney(payout), idx);
GameTextForPlayer(playerid, string, 5000, 5);
if(PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
return 1;
}
CMD:ru(playerid,params[]) return cmd_rules(playerid,params[]);
CMD:rul(playerid,params[]) return cmd_rules(playerid,params[]);
CMD:rule(playerid,params[]) return cmd_rules(playerid,params[]);
Here is an example of what are you trying to do, compare your code with what you find here.
https://github.com/Open-GTO/Open-GTO...d_spectate.pwn |