if (strcmp(cmd, "/ashop", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 3175.3003, -1141.0750, 30.6428)) { SendClientMessage(playerid, COLOR_GRAD2, "* You are not near the shop !"); return 1; } ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Weapon Lists", "Kevlar Vest\nKnife\nColt45\nMac10\nAK-47\nShotgun\nSpas12\nSniper Rifle\nMolotov Cocktails", "Select", "Cancel"); } return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Colt 45 from the shelf !"); GivePlayerWeapon(playerid, 22, 100000);//Colt 45 } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Mac-10 from the shelf !"); GivePlayerWeapon(playerid, 28, 100000);// tec 9 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up an AK47 from the Gun Locker !"); GivePlayerWeapon(playerid, 30, 100000);//AK } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Shotgun from the Gun Locker !"); GivePlayerWeapon(playerid, 25, 100000);//shotgun } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Molotov Cocktail's from the shelf !"); GivePlayerWeapon(playerid, 18, 2);//Molotov Cocktail } } return 1; } return 0; }
if (strcmp(cmd, "/dshop", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 2106.1311,-1837.8669,10.3766)) { SendClientMessage(playerid, COLOR_GRAD2, "* You are not near the shop !"); return 1; } ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapon Lists", "Kevlar Vest\nKnife\nDesert Eagle\nMP5\nM4\nSpas12\nSniper Rifle\nGrenades\nTeargas", "Select", "Cancel"); } return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) } { if(dialogid == DIALOGID) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Desert Eagle from the shelf !"); GivePlayerWeapon(playerid, 24, 100000);//Deagle } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have have taken an MP5 from the shelf !"); GivePlayerWeapon(playerid, 29, 100000);//mp5 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken an M4 from the shelf !"); GivePlayerWeapon(playerid, 31, 100000);//M4 } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have carefully taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Grenade's from the shelf"); GivePlayerWeapon(playerid, 16, 2);//Naids } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Tear Gas' from the shelf !"); GivePlayerWeapon(playerid, 17, 2);//Tear Gas } } return 1; } return 0; }
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1686) : error 029: invalid expression, assumed zero C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1688) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1690) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1692) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1694) : error 055: start of function body without function header C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1699) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1701) : error 055: start of function body without function header C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1706) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1709) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1713) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1716) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1720) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1723) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1727) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1730) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1733) : error 054: unmatched closing brace ("}") C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1735) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1738) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1741) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1744) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1747) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1750) : error 021: symbol already defined: "SendClientMessage" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1756) : error 054: unmatched closing brace ("}") C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1758) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1760) : error 010: invalid function or declaration C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1763) : error 054: unmatched closing brace ("}") Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !");
SetPlayerArmour(playerid, 100);
}
if(listitem == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a knife from the draw !");
GivePlayerWeapon(playerid, 4, 100000);//Knife
}
if(listitem == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Desert Eagle from the shelf !");
GivePlayerWeapon(playerid, 24, 100000);//Deagle
}
if(listitem == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have have taken an MP5 from the shelf !");
GivePlayerWeapon(playerid, 29, 100000);//mp5
}
if(listitem == 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken an M4 from the shelf !");
GivePlayerWeapon(playerid, 31, 100000);//M4
}
if(listitem == 5)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !");
GivePlayerWeapon(playerid, 27, 100000);//spas12
}
if(listitem == 6)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have carefully taken a Sniper Rifle out of the Gun Locker !");
GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle
}
if(listitem == 7)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Grenade's from the shelf");
GivePlayerWeapon(playerid, 16, 2);//Naids
}
if(listitem == 8)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Tear Gas' from the shelf !");
GivePlayerWeapon(playerid, 17, 2);//Tear Gas
}
}
}
return true;
}
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1757) : error 021: symbol already defined: "OnDialogResponse" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
//============================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOGID) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Desert Eagle from the shelf !"); GivePlayerWeapon(playerid, 24, 100000);//Deagle } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have have taken an MP5 from the shelf !"); GivePlayerWeapon(playerid, 29, 100000);//mp5 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken an M4 from the shelf !"); GivePlayerWeapon(playerid, 31, 100000);//M4 } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have carefully taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Grenade's from the shelf"); GivePlayerWeapon(playerid, 16, 2);//Naids } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Tear Gas' from the shelf !"); GivePlayerWeapon(playerid, 17, 2);//Tear Gas } } } return true; } //============================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Colt 45 from the shelf !"); GivePlayerWeapon(playerid, 22, 100000);//Colt 45 } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Mac-10 from the shelf !"); GivePlayerWeapon(playerid, 28, 100000);// tec 9 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up an AK47 from the Gun Locker !"); GivePlayerWeapon(playerid, 30, 100000);//AK } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Shotgun from the Gun Locker !"); GivePlayerWeapon(playerid, 25, 100000);//shotgun } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Molotov Cocktail's from the shelf !"); GivePlayerWeapon(playerid, 18, 2);//Molotov Cocktail } } return 1; } return 0; }
Originally Posted by xLowrider
Okay that worked
![]() I'm only getting one error now. Код:
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\bare.pwn(1757) : error 021: symbol already defined: "OnDialogResponse" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. Код:
//============================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOGID) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Desert Eagle from the shelf !"); GivePlayerWeapon(playerid, 24, 100000);//Deagle } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have have taken an MP5 from the shelf !"); GivePlayerWeapon(playerid, 29, 100000);//mp5 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken an M4 from the shelf !"); GivePlayerWeapon(playerid, 31, 100000);//M4 } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have carefully taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Grenade's from the shelf"); GivePlayerWeapon(playerid, 16, 2);//Naids } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Tear Gas' from the shelf !"); GivePlayerWeapon(playerid, 17, 2);//Tear Gas } } } return true; } //============================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { if(listitem == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !"); SetPlayerArmour(playerid, 100); } if(listitem == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Knife from the draw !"); GivePlayerWeapon(playerid, 4, 100000);//Knife } if(listitem == 2) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Colt 45 from the shelf !"); GivePlayerWeapon(playerid, 22, 100000);//Colt 45 } if(listitem == 3) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Mac-10 from the shelf !"); GivePlayerWeapon(playerid, 28, 100000);// tec 9 } if(listitem == 4) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up an AK47 from the Gun Locker !"); GivePlayerWeapon(playerid, 30, 100000);//AK } if(listitem == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Shotgun from the Gun Locker !"); GivePlayerWeapon(playerid, 25, 100000);//shotgun } if(listitem == 6) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !"); GivePlayerWeapon(playerid, 27, 100000);//spas12 } if(listitem == 7) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Sniper Rifle out of the Gun Locker !"); GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle } if(listitem == 8) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Molotov Cocktail's from the shelf !"); GivePlayerWeapon(playerid, 18, 2);//Molotov Cocktail } } return 1; } return 0; } |