error 004: function "OnPlayerCommandPerformed" is not implemented -
Guest123 - 28.05.2013
help me with error 004: function "OnPlayerCommandPerformed" is not implemented
pawn Код:
CMD:radio(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new idx;
new tmp[256];
tmp = strtok(params,idx);
if(strlen(params) > 0) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 1) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 2) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 3) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 4) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 5) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 6) return SendClientMessage(playerid, -1, "bad url");
if(strlen(params) > 7) return SendClientMessage(playerid, -1, "bad url");
if(strlen(tmp) == 0) return SendClientMessage(playerid, -1, "/radio (url)");
PlayAudioStreamForAll(tmp);
return 1;
}
else OnPlayerCommandPerformed(playerid, "/radios");
return 1;
}
help me pls
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
dannyk0ed - 28.05.2013
Replace it with
pawn Код:
return cmd_radios(playerid,"");
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
SilverKiller - 28.05.2013
Change :
pawn Код:
else OnPlayerCommandPerformed(playerid, "/radios");
To :
pawn Код:
else SendClientMessage(playerid, -1, "/radios");
Or use dannyk0ed's method.
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
Guest123 - 28.05.2013
what is this
pawn Код:
cmd_radios(playerid,"//what is this");
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
dannyk0ed - 28.05.2013
Keep it like it is.
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
Konewka - 28.05.2013
What is the purpose of giving a direction to that command when you already defined it using dcmd? OnPlayerCommandPerformed shouldn't be used like you did.
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
Guest123 - 28.05.2013
sorry for bumping, after i do /radio
http://k004.kiwi6.com/hotlink/qms38k...fiber.com_.mp3
this only showed and i can't sound that link
pawn Код:
CMD:radio(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new Index;
new tmp[256+1]; tmp = strtok(params,Index);
tmp = strtok(params,Index);
if(strlen(tmp) == 0) return SendClientMessage(playerid, -1, "/radio (url)");
PlayAudioStreamForAll(tmp);
return 1;
}
else GameTextForPlayer(playerid,"~r~SERVER: UNKNOWN COMMAND USE /CMDS TO SEE ALL COMMAND",4000,3);
return 1;
}
sorry for my bad eng :/
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
SilverKiller - 28.05.2013
Show us the PlayAudioStreamForAll Function.
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
Guest123 - 28.05.2013
pawn Код:
stock PlayAudioStreamForAll(url[])
{
for(new i = 0, e = GetMaxPlayers(); i < e; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, url);
}
}
return 1;
}
Re: error 004: function "OnPlayerCommandPerformed" is not implemented -
Guest123 - 28.05.2013
hello