BUGS/ERRORS!!?
#1

Guys I have Problems with this errors/bugs

I will gonna Pm my Friend like this


Then when i will gonna Enter it it says like this


and my pawn code is like this
pawn Code:
CMD:pm(playerid,params[])
{
    new giveplayerid, inputtext[256];
    if (sscanf(params, "us", giveplayerid, inputtext)) return Inter_SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /pm [PlayerID] [Message]");

    if(giveplayerid == playerid) return
    Inter_SendClientMessage(playerid, red, "ERROR: You can't send PM to yourself!");

    if(!(IsPlayerConnected(giveplayerid) && giveplayerid != INVALID_PLAYER_ID)) return
    Inter_SendClientMessage(playerid, red, "ERROR: Player not Connected!");
    PMplayer1 = giveplayerid;
    GetPlayerName(giveplayerid, PmReceiver, sizeof(PmReceiver));
    OnPlayerPrivmsg(playerid, giveplayerid, inputtext);
/*  new string[128];
    format(string,sizeof(string),"PM To: \"%s(%d)\" \n\nType the message to send:", PmReceiver, PMplayer1);
    ShowPlayerDialog(playerid,DIALOG_TYPE_PM,DIALOG_STYLE_INPUT,"PrivateMessage",string,"Send!","Cancel");*/

    return 1;
}
#endif
second errors/bugs

i download the radio fs but he dont have scroll bar like this


but the pawn code is like this
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(!response) return 1;
    if(dialogid == DEIALOG_ID)
    {
        if(listitem == sizeof(radiolist)) return OnPlayerCommandText(playerid,"/radio");
            if(listitem == sizeof(radiolist)+1) return StopAudioStreamForPlayer(playerid),Radio[playerid] = false;
            StopAudioStreamForPlayer(playerid);
            PlayAudioStreamForPlayer(playerid,radiolist[listitem][0]);
            new str[50]; format(str,50,"Now listening to \"%s\"...",radiolist[listitem][1]);
            SendClientMessage(playerid,0x33CCFFAA,str);
            SendClientMessage(playerid,0xFFFFFFAA,"Stop listening: /MOFF");
            Radio[playerid] = true;
            return 1;
    }

Please reply quickly
Reply
#2

Anyone?
Reply
#3

EDIT: OnPlayerPrivmsg was removed in SA-MP 0.3. See below how to create a /pm command.

pawn Code:
if(!strcmp("/pm", cmdtext, true))
{
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,0xFF0000FF,"USAGE: /PM (id) (message)");
    new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);
    if(!strlen(gMessage)) return SendClientMessage(playerid,0xFF0000FF,"Usage: /pm (id) (message)");       
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"/pm :Invalid ID");
    GetPlayerName(id,iName,sizeof(iName));
    GetPlayerName(playerid,pName,sizeof(pName));
    format(Message,sizeof(Message),">> %s(%i): %s",iName,id,gMessage);
    SendClientMessage(playerid,0xFFD720FF,Message);
    format(Message,sizeof(Message),"** %s(%i): %s",pName,playerid,gMessage);
    SendClientMessage(id,0xFFD720FF,Message);
    PlayerPlaySound(id,1085,0.0,0.0,0.0);
    return 1;
}
From SA-MP Wiki.
Reply
#4

how about the scroll bar?
Reply
#5

I dont know, I cant imagine the code of that FS and edit it in my thoughts.
Reply
#6

Quote:
Originally Posted by windrush
View Post
how about the scroll bar?
Are you sure there are more radio stations in that filterscript?
Reply
#7

You can see that it cuts of at {FA (the start of an embedded color tag) which indicates that the output string is not big enough.
Reply
#8

how to fix it?
Reply
#9

show your /radio command lines
Reply
#10

Quote:
Originally Posted by HuSs3n
View Post
show your /radio command lines
It wouldn't be the command line, that we would need.

It would have to be on the dialog.

Code:
if(dialogid == [nameOfRadioDialog])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)