26.11.2010, 18:48
hello guys i wan't to make dialog i made it but i need when player will choose some weapon of the list i want to come back the same dialog in same position not to exit..
cause when im choosing some weapons the dialog exit and i need again to tupe /dweap to show... hope u understand me xD
here is the script:
EDIT: and please some one tell me what is the problem with this command...
cause giving me some errors...
Thanks for helping.
cause when im choosing some weapons the dialog exit and i need again to tupe /dweap to show... hope u understand me xD
here is the script:
pawn Код:
if(strcmp(cmdtext, "/dweap", true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_DWEAP, DIALOG_STYLE_LIST, "Doantors Packet Weapons", "\nSniper" "\nM5" "\nTec9" "\nM4" "\nSawn Off" "\nDeagle" "\nArmor", "Get", "Cancel");
return 1;
}
if(dialogid == DIALOG_DWEAP)
{
if(response)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 34, 5000);
SendClientMessage(playerid, RED, "You have picked Sniper.");
}
case 1:
{
GivePlayerWeapon(playerid, 29, 5000);
SendClientMessage(playerid, RED, "You have picked MP5.");
}
case 2:
{
GivePlayerWeapon(playerid, 32, 6000);
SendClientMessage(playerid, RED, "You have picked Tec9.");
}
case 3:
{
GivePlayerWeapon(playerid, 31, 5000);
SendClientMessage(playerid, RED, "You have picked M4");
return 1;
}
case 4:
{
GivePlayerWeapon(playerid, 26, 5000);
SendClientMessage(playerid, RED, "You have picked Sawn Off.");
return 1;
}
case 5:
{
GivePlayerWeapon(playerid, 24, 5000);
SendClientMessage(playerid, RED, "You have picked Deagle.");
return 1;
}
case 6:
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, RED, "You have picked Armor.");
return 1;
}
}
}
else SendClientMessage(playerid,0xff0000FF, "You have cancelled.");
}
pawn Код:
if(strcmp(cmdtext, "/fix", true) == 0)
{
new healt;
GetVehicleHealth(vehicleid, healt);
if(healt < 800.0)
{
SetVehicleHealth(vehicleid, 1000);
}
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "You are not in any vehicle.");
SendClientMessage(playerid, RED, "Your vehicle has been successfully repaired!");
return 1;
}
pawn Код:
C:\Documents and Settings\Vlado\Desktop\samp\gamemodes\Mace-Roleplay.pwn(640) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Vlado\Desktop\samp\gamemodes\Mace-Roleplay.pwn(643) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
