streamer cp
#1

whats wrong with this? compiles without errors:

Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
	if(checkpointid == cp[0])
	    {
	        if(Member[playerid] != 4)
	            {
	                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Organisation:SAPD", "WIP","Ok","");
	            }
	    }
	if(checkpointid == cp[1])
	    {
	        if(Member[playerid] != 2)
	            {
	                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Organisation:SWAT", "WIP","Ok","");
	            }
	    }
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1)
	    {
	        if(response)
	            {
	            SendClientMessage(playerid, red, "BLAH");
	            }
			return 0;
		}
	if(dialogid == 1)
	    {
	        if(response)
	            {
	            SendClientMessage(playerid, red, "BLAH");
	            }
	        return 0;
		}
	return 0;
}
i can see the cp
Reply
#2

Do you mean you can't see the cp? Show where you create the cp. Also return 1 in OnPlayerDialogResponse or nothing will happen when you use the dialogs.
Reply
#3

I think you set the member if() wrong, shouldn't it be like this:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == cp[0])
        {
            if(Member[playerid] == 4)
                {
                    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Organisation:SAPD", "WIP","Ok","");
                }
        }
    if(checkpointid == cp[1])
        {
            if(Member[playerid] == 2)
                {
                    ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Organisation:SWAT", "WIP","Ok","");
                }
        }
    return 1;
}
Reply
#4

i can but when i step on it it doesnt do anything.(doesnt show dialogs in my case)
Reply
#5

That prolly because your ids are mixed up show where you create it.
Reply
#6

the member thing is ok as i have tried it without streamer (i wanted it for non members olny)
Reply
#7

Код:
cp[0]=CreateDynamicCP(2293.2817,2431.3162,10.8203, 1, -1, -1, -1);//under onplayerspawn
    cp[1]=CreateDynamicCP(2487.6343,2349.3386,10.8203,-1,-1,-1,-1);
Reply
#8

Okei, then show us where you create the checkpoints.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == cp[0] && Member[playerid] != 4)ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Organisation:SAPD", "WIP","Ok","");
    else if(checkpointid == cp[1] && Member[playerid] != 2) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Organisation:SWAT", "WIP","Ok","");
    return 1;
}
Reply
#9

Don't put it in onplayerspawn my advice earlier was flawed put it in OnGamemodeInit. (it will still show for all players) otherwise the checkpointid will change everytime a player spawns.
Reply
#10

gamemodeinit didnt bring me anyluck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)