SA-MP Forums Archive
HELP! **READ PLEASE** NEED ASAP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP! **READ PLEASE** NEED ASAP (/showthread.php?tid=172710)



How to make a command type another command? - gangestergta - 31.08.2010

Hello, I was just wondering how i could do this,

So i am using incognitos audio plugin thing but, i want like when a player typed the command /radio it types another command in response (/playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0)

I am just wondering if there is a possible way to do so because that would be really cool, if someone could help me on this issue.

Thanks in advance!


Re: HELP! **READ PLEASE** NEED ASAP - Master™ - 31.08.2010

Please dont make everything in your title ALL CAPITAL LETTERS also "Help! **READ PLEASE** NEED ASAP" isnt at all descriptive


Re: HELP! **READ PLEASE** NEED ASAP - Grim_ - 31.08.2010

Inside the /radio command, type
pawn Код:
OnPlayerCommandText(playerid, "/playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0");
EDIT: Without the URL tags, the forums added them


Re: HELP! **READ PLEASE** NEED ASAP - gangestergta - 31.08.2010

Thank you so much Grim_ ! I really didn't think it was that easy XD Anyways you solved my problem of the day. Congratz


Re: HELP! **READ PLEASE** NEED ASAP - Voldemort - 31.08.2010

omg, just rename /radio cmd to /playstreamed


Re: HELP! **READ PLEASE** NEED ASAP - gangestergta - 31.08.2010

Quote:
Originally Posted by Voldemort
Посмотреть сообщение
omg, just rename /radio cmd to /playstreamed
Voldemort, Im trying to make the command /radio so it is more player accessible. If you just reply with useless advice, Please don't

Edit: Just found the problem with the URL thing XD


Re: HELP! **READ PLEASE** NEED ASAP - RSX - 31.08.2010

lol i once hacked streamed radio into original game radio. I guess bit rate sucked, cause i didn't understand nearly anything that i heard.


Re: HELP! **READ PLEASE** NEED ASAP - Grim_ - 31.08.2010

If you want them to do the same exact things, you could just do
pawn Код:
if(strcmp(cmdtext, "/radio", true) == 0 || strcmp(cmdtext, "/playstreamed", true) == 0)
It checks if either "/radio" or /playstreamed were typed.


Re: HELP! **READ PLEASE** NEED ASAP - gangestergta - 31.08.2010

Hmm, It won't work, Like when i type /radio it dosent do a thing. I want it to type /playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0 in reponse but for some reason it wont work, Here ill send you the command i got at the moment:

pawn Code:

if(strcmp(cmdtext, "/radio", true) == 0)
{
OnPlayerCommandText(playerid, "/playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0");
return 1;
}


Re: HELP! **READ PLEASE** NEED ASAP - Retardedwolf - 31.08.2010

Quote:
Originally Posted by gangestergta
Посмотреть сообщение
Hmm, It won't work, Like when i type /radio it dosent do a thing. I want it to type /playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0 in reponse but for some reason it wont work, Here ill send you the command i got at the moment:

pawn Code:

if(strcmp(cmdtext, "/radio", true) == 0)
{
OnPlayerCommandText(playerid, "/playstreamed http://64.150.181.14:14156/listen.pls 0 0 0 0");
return 1;
}
That wouldn't work.


So you want them to receive a message or actually play it?