03.11.2010, 09:55
I have made a /ammo menu for my DM script and I have a few Classes in it,
But they are all mixed up, I have tried to fix them but still they are mixed up?,
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
if(listitem == 1)
{
SetPlayerHealth(playerid, 500);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 24, 100);
}
if(listitem == 4)
{
SetPlayerArmour(playerid, 500);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 16, 10);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 35, 50);
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You have been equipted with a RPG - Please do not use this in a good way");
}
return 1;
}
return 0;
}
pawn Код:
if (!strcmp("/ammo", cmdtext, true, 5))
{
if (IsPlayerInRangeOfPoint(playerid, 5.0, 154.7751,2437.9829,16.4721))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Ammunation - ", "Health - $500\nGrenade - $3000\nDesert Eagle - $1000\nArmour - $500\nRPG - $50000", "Buy", "Cancel");
}
return 1;
}