weapon pack help needed!
#8

Quote:
Originally Posted by <__Ǝthan__>
pawn Код:
if(strcmp(cmdtext, "/weaponpackadmin", true) == 0)
{
 if(IsPlayerAdmin(playerid))
 {
   SetPlayerArmour(playerid,100.0);
   GivePlayerWeapon(playerid, 24, 10000);
   GivePlayerWeapon(playerid, 32, 10000);
   GivePlayerWeapon(playerid, 36, 10000);
   GivePlayerWeapon(playerid, 3, 10000);
   GivePlayerWeapon(playerid, 27, 10000);
   GivePlayerWeapon(playerid, 41, 10000);
   return 1;
 }
 else
 {
   SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command As You Are Not Admin!"
   return 1;
 }
 return 1;
}
that should work.
The whole point of an else statement is so you dont have to return 1, So i think the compiler would bitch about that, Try this
[quote=<__Ǝthan__> ]
pawn Код:
if(strcmp(cmdtext, "/weaponpackadmin", true) == 0)
{
 if(IsPlayerAdmin(playerid))
 {
   SetPlayerArmour(playerid,100.0);
   GivePlayerWeapon(playerid, 24, 10000);
   GivePlayerWeapon(playerid, 32, 10000);
   GivePlayerWeapon(playerid, 36, 10000);
   GivePlayerWeapon(playerid, 3, 10000);
   GivePlayerWeapon(playerid, 27, 10000);
   GivePlayerWeapon(playerid, 41, 10000);
 }
 else
 {
   SendClientMessage(playerid, color, "You Cannot Use This Command As You Are Not Admin!"); // Replace color with a color of your choice
 }
 return 1;
}
Reply


Messages In This Thread
weapon pack help needed! - by guaid - 18.04.2009, 14:00
Re: weapon pack help needed! - by Klutty - 18.04.2009, 14:05
Re: weapon pack help needed! - by guaid - 18.04.2009, 14:16
Re: weapon pack help needed! - by guaid - 18.04.2009, 15:08
Re: weapon pack help needed! - by Klutty - 18.04.2009, 15:30
Re: weapon pack help needed! - by StrickenKid - 18.04.2009, 15:35
Re: weapon pack help needed! - by guaid - 18.04.2009, 15:42
Re: weapon pack help needed! - by ICECOLDKILLAK8 - 18.04.2009, 15:43
Re: weapon pack help needed! - by StrickenKid - 18.04.2009, 15:46
Re: weapon pack help needed! - by guaid - 18.04.2009, 15:48

Forum Jump:


Users browsing this thread: 2 Guest(s)