13.05.2012, 03:02
Here you are missing the amount of ammo to be given:
So change it to:
The identation part was done with the help of DarcoBlue's project TidyPawn I use that
You were missing some brackets in the end line, your complete code:
And for the first error, you are missing return. Must be something like this:
Wish Ya luck.
pawn Код:
case 14:
{
GivePlayerWeapon(playerid, 39, 1000);
GivePlayerWeapon(playerid, 40);//here
}
pawn Код:
case 14:
{
GivePlayerWeapon(playerid, 39, 1000);
GivePlayerWeapon(playerid, 40, /*amount of ammo*/);
}
You were missing some brackets in the end line, your complete code:
pawn Код:
switch(listitem) { // Checking which listitem was selected
case 0 : ShowPlayerDialog(playerid, DIALOG_WEPS, DIALOG_STYLE_LIST, "{FF0000}Weapons", "{00FF00}9mm\n{00FF00}Silenced 9mm\n{00FF00}Desert Eagle\n{00FF00}Tec-9\n{00FF00}Micro SMG\n{00FF00}SMG\n{00FF00}Shotgun\n{00FF00}Sawnoff Shotgun\n{00FF00}Combat Shotgun\n{00FF00}M4\n{00FF00}Ak47\n{00FF00}Sniper Rifle\n{00FF00}Molotov Cocktail\n{00FF00}Grenade\n{00FF00}Remote Explosives\n{00FF00}Mini Gun\n{00FF00}Rocket Launcher", "ok", "cancel");
case 1 : ShowPlayerDialog(playerid, DIALOG_CARS, DIALOG_STYLE_LIST, "{FF0000}Cars", "{00FF00}Airplanes\n{00FF00}Helicopters\n{00FF00}Bikes\n{00FF00}Convertibles\n{00FF00}Industrial\n{00FF00}Lowriders\n{00FF00}Off Road\n{00FF00}Public Service Vehicles\n{00FF00}Saloons\n{00FF00}Sport Vehicles\n{00FF00}Station Wagons\n{00FF00}Boats\n{00FF00}Trailers\n{00FF00}Unique Vehicles", "Select", "Cancel" );
case 2 : ShowPlayerDialog(playerid, DIALOG_USERS, DIALOG_STYLE_LIST, "{FF0000}Administrate Users", "{00FF00}Kick\n{00FF00}Ban\n{00FF00}Slap", "ok", "cancel");
}
if(dialogid == DIALOG_WEPS) {
if(response) {
switch(listitem) {
case 0:
{
GivePlayerWeapon(playerid, 22, 1000);
}
case 1:
{
GivePlayerWeapon(playerid, 23, 1000);
}
case 2:
{
GivePlayerWeapon(playerid, 24, 1000);
}
case 3:
{
GivePlayerWeapon(playerid, 32, 1000);
}
case 4:
{
GivePlayerWeapon(playerid, 28, 1000);
}
case 5:
{
GivePlayerWeapon(playerid, 29, 1000);
}
case 6:
{
GivePlayerWeapon(playerid, 25, 1000);
}
case 7:
{
GivePlayerWeapon(playerid, 26, 1000);
}
case 8:
{
GivePlayerWeapon(playerid, 27, 1000);
}
case 9:
{
GivePlayerWeapon(playerid, 31, 1000);
}
case 10:
{
GivePlayerWeapon(playerid, 30, 1000);
}
case 11:
{
GivePlayerWeapon(playerid, 34, 1000);
}
case 12:
{
GivePlayerWeapon(playerid, 18, 1000);
}
case 13:
{
GivePlayerWeapon(playerid, 16, 1000);
}
case 14:
{
GivePlayerWeapon(playerid, 39, 1000);
GivePlayerWeapon(playerid, 40, 1000);
}
case 15:
{
GivePlayerWeapon(playerid, 38, 1000);
}
case 16:
{
GivePlayerWeapon(playerid, 35, 1000);
}
}
}
}
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/butler", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_RED, "You are a good friend of mine");
return 1;
}
return 0;
}

