[HELP] Crash Player Problem - Larsey123IsMe - 12.12.2010
That i need help is to get the "Crash Player" to work
When i press at "Crash Player", then nothing happends, even the SendClientMessage dont show =/
Scroll to bottom to see the "Crash Player" BTW "CrashPlayer(playerid);" comes from the #include <admin_menu>
pawn Код:
#include <a_samp>
#include <admin_menu>
new tmp[128];
new adminPlayer[20];
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(IsPlayerLarsey(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive PlayerMoney\nSet Player Score\nCrash Player", "Select", "Cancel");
new id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
adminPlayer[playerid] = clickedplayerid;
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Where do you want to go?", "\n \n-Las Venturas Airport\n-San Fierro Airport\n-Los Santos Airport\n-Abandoned Airport\n \n-Las Venturas Bank\n-Admin HQ\n-ARMY Base\n-S.W.A.T Base\n-Regular Players Lounge\n-Derby\n-Alcatraz", "Teleport", "Cancel");
else if(listitem == 1) return ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Heal Menu", "Enter the amount of health", "Heal", "Cancel");
else if(listitem == 2) return ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Armour Menu", "Enter the amount of armour", "Armour", "Cancel");
else if(listitem == 3) return ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Money Menu", "Enter the amount of money", "Money", "Cancel");
else if(listitem == 4) return ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Score Menu", "Enter the amount of score", "Score", "Cancel");
}
}
//Teleports---------------------------------------------------------------------
else if(dialogid == 2)
{
if(response)
{
if(listitem == 1)
{
//Teleport things
}
else if(listitem == 2)
{
//Teleport things
}
else if(listitem == 3)
{
//Teleport things
}
else if(listitem == 4)
{
//Teleport things
}
else if(listitem == 6)
{
//Teleport things
}
else if(listitem == 7)
{
//Teleport things
}
else if(listitem == 8)
{
//Teleport things
}
else if(listitem == 9)
{
//Teleport things
}
else if(listitem == 10)
{
//Teleport things
}
else if(listitem == 11)
{
//Teleport things
}
else if(listitem == 12)
{
//Teleport things
}
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
//Heal Player-------------------------------------------------------------------
else if(dialogid == 3)
{
if(response)
{
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: You must enter a number!");
else {
//Heal Thing Here
adminPlayer[playerid] = -1;
}
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
//Give Player Armour------------------------------------------------------------
else if(dialogid == 4)
{
if(response)
{
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: You must enter a number!");
else {
//Armour Thing Here
adminPlayer[playerid] = -1;
}
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
//Give Player Money-------------------------------------------------------------
else if(dialogid == 5)
{
if(response)
{
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: You must enter a number!");
else {
//Money Thing Here
adminPlayer[playerid] = -1;
}
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
//Set Player Score--------------------------------------------------------------
else if(dialogid == 6)
{
if(response)
{
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: You must enter a number!");
else {
//Score Thing Here
adminPlayer[playerid] = -1;
}
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
//Crash Player------------------------------------------------------------------
else if(dialogid == 7)
{
if(response)
{
CrashPlayer(playerid);
SendClientMessage(playerid,COLOR_RED,"You crashed that poor kid!");
} else return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive Player Money\nSet Player Score\nCrash Player", "Select", "Cancel");
}
return 1;
}
Thanks to Webghost and famas.[FTW] who have helped me alot with this
Re: [HELP] Crash Player Problem -
iFriSki - 12.12.2010
pawn Код:
if(IsPlayerLarsey(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Teleports\nHeal Player\nGive Player Armour\nGive PlayerMoney\nSet Player Score\nCrash Player", "Select", "Cancel");
new id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
adminPlayer[playerid] = clickedplayerid;
}
You're not giving them the option in dialog ID 1 to get to ID 7. By the way, from what I skimmed through on your code, you'll end up crashing yourself.
Re: [HELP] Crash Player Problem - Larsey123IsMe - 12.12.2010
Still dont work =/
Re: [HELP] Crash Player Problem -
Basicz - 12.12.2010
CrashPlayer(adminPlayer[playerid]);
Dunno will that works.
Re: [HELP] Crash Player Problem - Larsey123IsMe - 12.12.2010
Quote:
Originally Posted by Basicz
CrashPlayer(adminPlayer[playerid]);
Dunno will that works.
|
I know that will work, but when i click at "Crash Player" it is like it don have an function
Re: [HELP] Crash Player Problem - Larsey123IsMe - 12.12.2010
Evrything else work, but not the "Crash Player" I have tried 100 times to get it to work but i get the same resultat, "When i click at Crash Player, Nothing happends" =/
Re: [HELP] Crash Player Problem -
olabv - 13.12.2010
hm... have you checked on the wiki ?