Only for [tag] (Giving Credits!) - 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: Only for [tag] (Giving Credits!) (
/showthread.php?tid=90369)
Only for [tag] (Giving Credits!) -
Sal_Kings - 07.08.2009
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!
Re: Only for [tag] (Giving Credits!) -
MadeMan - 07.08.2009
pawn Код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if(strcmp(playername, "[GunDealer]", true, strlen("[GunDealer]")) == 0)