Only for [tag] (Giving Credits!)
#1

So basically this is my script.
Код:
	if (strcmp(cmd, "/BuyGrenades", true) == 0)
	{
	new
	tmp[20],
	amount;
	tmp = strtok(cmdtext, index);
	if (strlen(tmp))
	{
	amount = strval(tmp);
	if (IsPlayerConnected(amount))
	{
	GivePlayerWeapon(playerid,16,amount");
	GivePlayerMoney(playerid,-amount*1000)
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "You Don't Have enough Money!");
	}
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/buygrenades <amount>\"");
	}
	return 1;
Now, I want it to be if you don't have [GunDealer] infront of your name then you cant use the command.

Help and i will add you in the Credits section for the FS i am working on!
Reply
#2

pawn Код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if(strcmp(playername, "[GunDealer]", true, strlen("[GunDealer]")) == 0)
Reply


Forum Jump:


Users browsing this thread: