playerid but NOT pid
#1

I just wanna give Wanteds over a dialog input, but It wont work, I tried it with a PVarInt & a Variable but nothing works

fahnden = player who is wanted

Quote:

if(dialogid == DIALOG_MDC)
{

if(response == 1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,DIALOG_MDCCHECK,DIALOG_S TYLE_INPUT,"Player check","enter the exact username!!","enter","exit");
}
case 1:
{
ShowPlayerDialog(playerid,DIALOG_MDCFAHNDUNG,DIALO G_STYLE_INPUT,"Player Wanted","Enter the exact Username!","enter","exit");

}
}
}
return 1;
}
if(dialogid == DIALOG_MDCFAHNDUNG)
{
ShowPlayerDialog(playerid,DIALOG_MDCREASON,DIALOG_ STYLE_INPUT,"Player fahnden","Enter a Reason:","Go","Exit");
}
if(dialogid == DIALOG_MDCREASON)
{
if(!response) return 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{


new pid = GetPVarInt(playerid,"FahndetName");

new string62[128];
format(string62, sizeof(string62), "HQ: Reporter: %s",GetName(playerid));
SendClientMessage(i, TEAM_BLUE_COLOR, string62);
format(string62, sizeof(string62), "HQ: %s is Wanted, Crime: %s",GetName(pid),inputtext);
SendClientMessage(i, TEAM_BLUE_COLOR, string62);
SendClientMessage(pid,-1,"test-you are wanted"); The Problem here: The Message is send to PLAYERiD and not pid
return 1;
}
}
}
return 1;

}


/edit:

Quote:

if (dialogid == DIALOG_MDCCHECK)
{

new mdccheck2 [128];
new pid;

new name [128];
// new pid = strval (inputtext);
********if (sscanf (inputtext, "u", pid))

// if (! response) return 1;

****if (pid == INVALID_PLAYER_ID) return SendClientMessage (playerid, -1, "The player is not online! Create a search offline");
*******// mysql_format (handle, strings, sizeof (string), "SELECT id, Username FROM user WHERE Username = '% e', pFirst = '% d', pFahndungGrund = '% e'", inputtext, PlayerInfo [playerid] [ pGefahndet] Player information [playerid] [pFahndungGrund]);
*****// mysql_format (handle, string, sizeof (string), "SELECT id, username FROM user WHERE username = '% e'", pname);
******// mysql_pquery (handle, strings, "MDCCheckForPlayer", "ds", playerid); // give UnBanForPlayer, otherwise it will not be called.
*****if (PlayerInfo [pid] [pForced] == 0) {Name = "No";}
if (PlayerInfo [pid] [pFiled]> = 1) {Name = "Yes";}
*******format (mdccheck2, sizeof (mdccheck2), "Name:% s \ nWill be searched:% s \ nVisited for:% s", GetName (pid), Name, PlayerInfo [pid] [pFahndungGrund]);
********Show Player dialog (playerid, 177, DIALOG_STYLE_MSGBOX, "data" mdccheck2, "Exit", "");
********// theMDCChecked [pid] = pid;
********SetPVarInt (playerid, "FahndetName" pid);
return 1;
}

Reply


Messages In This Thread
playerid but NOT pid - by playstores - 09.09.2018, 10:46
Re: playerid but NOT pid - by playstores - 09.09.2018, 11:17
Re: playerid but NOT pid - by coool - 09.09.2018, 11:20
Re: playerid but NOT pid - by CodeStyle175 - 09.09.2018, 11:24
Re: playerid but NOT pid - by playstores - 09.09.2018, 11:54

Forum Jump:


Users browsing this thread: 1 Guest(s)