SA-MP Forums Archive
how to define this - 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)
+--- Thread: how to define this (/showthread.php?tid=324265)



how to define this - misho1 - 08.03.2012

hi,
pawn Код:
if(listitem == 1) {
                new You[MAX_PLAYER_NAME];
                new ClickedPlayerID[MAX_PLAYERS];
                ClickedPlayerID[playerid] = clickedplayerid;
                GetPlayerName(clickedplayerid,You,MAX_PLAYER_NAME);
                SetPVarInt(playerid,"ClickedPlayer",clickedplayerid);
                ShowPlayerDialog(playerid,909,DIALOG_STYLE_INPUT,"private Message!","Write Your Message Here","Send","Close");
                }
Код:
E:\Freeroam World\filterscripts\admin.pwn(960) : error 017: undefined symbol "clickedplayerid"
E:\Freeroam World\filterscripts\admin.pwn(961) : error 017: undefined symbol "clickedplayerid"
how to define "clickedplayerid" to the dialog Response?


Re: how to define this - ReneG - 08.03.2012

You would need to change it in the include file, which you shouldn't do.


Re: how to define this - misho1 - 09.03.2012

how


Re: how to define this - eesh - 09.03.2012

Use OnPlayerClickPlayer


https://sampwiki.blast.hk/wiki/OnPlayerClickPlayer


Re: how to define this - misho1 - 09.03.2012

Quote:
Originally Posted by eesh
Посмотреть сообщение
i said:
Quote:
Originally Posted by misho1
Посмотреть сообщение
hi,
pawn Код:
if(listitem == 1) {
                new You[MAX_PLAYER_NAME];
                new ClickedPlayerID[MAX_PLAYERS];
                ClickedPlayerID[playerid] = clickedplayerid;
                GetPlayerName(clickedplayerid,You,MAX_PLAYER_NAME);
                SetPVarInt(playerid,"ClickedPlayer",clickedplayerid);
                ShowPlayerDialog(playerid,909,DIALOG_STYLE_INPUT,"private Message!","Write Your Message Here","Send","Close");
                }
Код:
E:\Freeroam World\filterscripts\admin.pwn(960) : error 017: undefined symbol "clickedplayerid"
E:\Freeroam World\filterscripts\admin.pwn(961) : error 017: undefined symbol "clickedplayerid"
how to define "clickedplayerid" to the dialog Response?



Re: how to define this - eesh - 09.03.2012

Quote:
Originally Posted by misho1
Посмотреть сообщение
i said:
yea but you cant get a clickedplayerid from normal dialogs. OnPlayerClieckedPlayer is from the TAB dialog.

if you still wanna use OnDialogResponse, can you show your ShowplayerDialog?


Re: how to define this - misho1 - 09.03.2012

i just want that when i click on player it show dialog that i teleport him or show his stats or pm him or do action on him (ban,kick,mute,freeze,gethere and goto)
but when i add clickedplayerid on dialog respons. i get errors

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    ShowPlayerDialog(playerid,1909,DIALOG_STYLE_LIST,"Player","Action \nPM\nStats\nTeleport","Select","Close");
    return 1;
}



Re: how to define this - rati555 - 09.03.2012

pawn Код:
new ClickedPlayerID[MAX_PLAYERS]; // at the top
if(listitem == 1) {
                new You[MAX_PLAYER_NAME];
                GetPlayerName(ClickedPlayerID[playerid],You,MAX_PLAYER_NAME);
                SetPVarInt(playerid,"ClickedPlayer",ClickedPlayerID[playerid]);
                ShowPlayerDialog(playerid,909,DIALOG_STYLE_INPUT,"private Message!","Write Your Message Here","Send","Close");
                }


public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
ClickedPlayerID[playerid] = clickedplayerid;  
ShowPlayerDialog(playerid,1909,DIALOG_STYLE_LIST,"Player","Action \nPM\nStats\nTeleport","Select","Close");
    return 1;
}
didn't test


Re: how to define this - misho1 - 09.03.2012

thnx!!!! i rep u


Re: how to define this - misho1 - 09.03.2012

sry sry sry sry sry for double post
but y it i get error in (listitem == 3)
pawn Код:
}
                if(listitem == 3) {
                new You[MAX_PLAYER_NAME];
                new Float:X, Float:Y, Float:Z;
                GetPlayerName(ClickedPlayerID[playerid],You,MAX_PLAYER_NAME);
                SetPVarInt(playerid,"ClickedPlayer",ClickedPlayerID[playerid]);
                GetPlayerPos(clickedplayerid, X, Y, Z);
                SetTimerEx("SetPlayerPosEx", 1000, false, "dfff", playerid,X+3,Y,Z+3);
                }
undefine symbol clickedplayerid

i added like in (listitem == 1) ??!!??