SA-MP Forums Archive
Command Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command Help! (/showthread.php?tid=120799)



Command Help! - Jbosh123 - 13.01.2010

Hey,

I am working on a command to set a weapon but theres going to be multiple weapons so how do I do it?

if(strcmp(cmd, "/setweapon bat", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SetWeapon = 5;
SendClientMessage(playerid, COLOR_WHITE, "The Set Weapon has been set to a Baseball Bat.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}

But Apparently it doesn't see the space and it will not work.
Is there something I can put between /setweapon (weapon name) to act as a space?


Re: Command Help! - MaykoX - 13.01.2010

amm /setweapon_bat or change the meaning like if strcm.... and add like am menu but difrent xD:P