13.07.2015, 16:21
Hello!
I have no idea why, but when i use the command /r, (works fine btw) it spits out 'unknown command' message. /opis doesn't have this problem tho.
Here's the code:
I have no idea why, but when i use the command /r, (works fine btw) it spits out 'unknown command' message. /opis doesn't have this problem tho.

Here's the code:
Код:
CMD:opis(playerid, params[])
{
new string[128], opis[100];
if(sscanf(params, "s[100]", opis))
return SendClientMessage(playerid, COLOR_GREY, "* Użyj: "C_WHITE"/opis [TEKST]");
if(Druzyna[playerid] != 1)
return SendClientMessage(playerid,COLOR_GREY,"* Nie jesteś człowiekiem!");
format(string, sizeof(string), "* %s (%s)", opis, PlayerName(playerid));
ProxDetector(25, playerid, string, COLOR_MORSKI);
return 1;
}
CMD:r(playerid, params[])
{
new msg[120],string[128];
if(sscanf(params,"s[120]", msg))
return SendClientMessage(playerid, COLOR_GREY, "* Użyj: "C_WHITE"/r [TREŚĆ]");
if(Druzyna[playerid] != 1)
return SendClientMessage(playerid,COLOR_GREY,"* Nie jesteś człowiekiem!");
ApplyAnimation(playerid,"PED","phone_talk",4.1,0,0,0,0,0);
format(string, sizeof(string), "%s", msg);
SendRadioMessage(playerid, COLOR_GOLD, string);
PlayerPlaySound(playerid, 2601, 0, 0, 0);
return 1;
}
Код:
stock SendRadioMessage(fromid, colour, msg[])
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(fromid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[RADIO]"C_WHITE" %s: %s", pName, msg);
printf("[RADIO] %s",string);
for(new i; i < GetMaxPlayers(); i++)
{
if(Druzyna[i] == 1)
{
SendClientMessage(i, colour, string);
}
}
}


no harm done
!