Commands crashes player
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Well, I'm not sure why or even if PlayAudioStreamForPlayer causes that. Anyways, I'll correct few things for you. Since it's a filterscript, define it. "/hirado" has not lenght of 10, but 7. Although, length is optional so don't use it. At the end, you loop through all the players and you play the audio for the player who typed the command only.
pawn Код:
#define FILTERSCRIPT

#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/hirado", cmdtext, true))
    {
        new string[128],name[24];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"{FF0000}Hнradу kцvetkezik! A stъdiуban {0099FF}%s!",name);
        SendClientMessageToAll(0xFF000000,string);
        for(new mindenki = 0; mindenki < MAX_PLAYERS; mindenki++)
        {
            if(!IsPlayerConnected(mindenki)) continue;
            PlayAudioStreamForPlayer(mindenki, "https://dl.dropboxusercontent.com/s/yi9hlwb51rpaek2/tenyek.wav?");
        }
        return 1;
    }
    return 0;
}
Alright,it's working now,but I got another fs what is buggy,i will try this there.
Reply


Messages In This Thread
Commands crashes player - by RaptorX72 - 23.09.2013, 15:28
Re: Commands crashes player - by DanishHaq - 23.09.2013, 15:30
Re: Commands crashes player - by Konstantinos - 23.09.2013, 15:32
Re: Commands crashes player - by RaptorX72 - 23.09.2013, 15:41
Re: Commands crashes player - by RaptorX72 - 23.09.2013, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)