27.05.2016, 09:34
Quote:
Guys this command don't give any Material why?
PHP код:
|
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 7)
{
if(response)
{
if(listitem == 0)
{
if(Materiali[playerid] > 399)
{
SendClientMessage(playerid, COLOUR_WHITE, "You have crafted yourself a desert eagle.");
GivePlayerWeapon(playerid, 24, 9999999);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_WHITE, "You dont have enough materials to make that.");
return 1;
}
}
if(listitem == 1)
{
if(Materiali[playerid] > 149)
{
SendClientMessage(playerid, COLOUR_WHITE, "You have crafted yourself a pump-action shotgun.");
GivePlayerWeapon(playerid, 25, 9999999);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_WHITE, "You dont have enough materials to make that.");
return 1;
}
}
if(listitem == 2)
{
if(Materiali[playerid] > 249)
{
SendClientMessage(playerid, COLOUR_WHITE, "You have crafted yourself a MP5.");
GivePlayerWeapon(playerid, 29, 9999999);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_WHITE, "You dont have enough materials to make that.");
return 1;
}
}
if(listitem == 3)
{
if(Materiali[playerid] > 499)
{
SendClientMessage(playerid, COLOUR_WHITE, "You have crafted yourself a M4 carbine.");
GivePlayerWeapon(playerid, 31, 9999999);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_WHITE, "You dont have enough materials to make that.");
return 1;
}
}
if(listitem == 4)
{
if(Materiali[playerid] > 549)
{
SendClientMessage(playerid, COLOUR_WHITE, "You have crafted yourself a Spas-12.");
GivePlayerWeapon(playerid, 27, 9999999);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_WHITE, "You dont have enough materials to make that.");
}
}
}
}
return 0; // Some Script can't used Dialog if you use return 1 .. Lets Make Return 0 for the other script can use dialog
}