new msgline[256];
new strtext[256];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, psame, sizeof(psame));
format(msgline,sizeof(msgline),"%s",psame);
haxedplayer[playerid] = i;
strcat(strtext, "\n");
strcat(strtext, msgline);
}
}
ShowPlayerDialog(playerid,723,DIALOG_STYLE_LIST,"Bank hack program",strtext,"Option 1", "Option 2");
}
switch(dialogid == 723) // Lookup the dialogid
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1; // We processed it
}
SendClientMessage(haxedplayer[playerid],COLOR_RED,"LOOOL");
}
}
Mate, what exactly you are looking for? Well, you want the list of the online players? and then if a player clicks on that player he sends a PM or a message he wants? if that so, you can use the following functions:-
OnPlayerClickPlayer(playerid, clickedplayerid, source); When you press tab you can see the online players right? you can use that. If you are not looking for such function then please explain well with the proper indentation of your script. Regards FalconX |
new dialoglist[1024], name[32];
new ii=0;
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
GetPlayerName(i, name, sizeof(name));
format(dialoglist,sizeof(dialoglist),"%s\n%s",dialoglist,name);
haxedplayer[ii]=i;
ii+=1;
}
}
return ShowPlayerDialog(playerid,723,DIALOG_STYLE_LIST,"Bank hack program",dialoglist,"Option 1", "Option 2");
switch(dialogid==723){
if(!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
else return SendClientMessage(haxedplayer[listitem],COLOR_RED,"LOOOL");
}
new strtext[1024]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerName(i, psame, sizeof(psame)); format(strtext,sizeof(strtext),"%s%s\n",strtext,psame); } } ShowPlayerDialog(playerid,723,DIALOG_STYLE_LIST,"Bank hack program",strtext,"Option 1", "Option 2"); stock ReturnID(nick[]) { new d,name[24]; while(d != MAX_PLAYERS) { if(IsPlayerConnected(d)) { GetPlayerName(d,name,24); if(!strcmp(nick,name)) return d; } d++; } return INVALID_PLAYER_ID; } switch(dialogid) // Lookup the dialogid { case 723: { if(!response) SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); // We processed it else{ new ID = ReturnID(inputtext); if(ID == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Player is not connected"); else SendClientMessage(ID,COLOR_RED,"LOOOL"); } } }
new strtext[1024],cnt; new haxedplayer[MAX_SLOTS][MAX_SLOTS]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerName(i, psame, sizeof(psame)); format(msgline,sizeof(msgline),"%s%s\n",strtext,psame); haxedplayer[playerid][cnt] = i; cnt++; } } ShowPlayerDialog(playerid,723,DIALOG_STYLE_LIST,"Bank hack program",strtext,"Option 1", "Option 2"); switch(dialogid) // Lookup the dialogid { case 723: { if(!response) SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); // We processed it else SendClientMessage(haxedplayer[playerid][listitem],COLOR_RED,"LOOOL"); } }