Command Help!
#1

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?
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)