SA-MP Forums Archive
[HELP] Commands - 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: [HELP] Commands (/showthread.php?tid=84991)



[HELP] Commands - cigo - 04.07.2009

Why cannot I use commands, witch are in my gamemode? When I type command nothing happens....


Re: [HELP] Commands - member - 04.07.2009

What do you mean, are none of the commands not working or are some of them only working?
Make sure your OnPlayerCommandText returns a false/0 and that your commands return a true/1.

This is the format:
https://sampwiki.blast.hk/wiki/OnPlayerCommandText




Re: [HELP] Commands - cigo - 04.07.2009

only the commands in gamemode not working. when i write, for example, /help nothing happens...

i did like showed in wiki - still not work :/

what else could be wrong?




Re: [HELP] Commands - cigo - 04.07.2009

Its working now - i just did like showed in wiki in other script...


Re: [HELP] Commands - cigo - 04.07.2009

Код:
	if (strcmp(cmdtext, "/buyaccess", true) == 0)
	{
    if (GetPlayerMoney(playerid) >= 10000000)
    {
		SendClientMessage(playerid, 0x33AA33AA, "You just bought access to weapon store!");
		gGunAccess[playerid] += 1;
    SetPlayerMoney(playerid, gPlayerMoney[playerid] - 10000000);
    return 1;
  }
		if(GetPlayerMoney(playerid) < 1000000)
	{
		return SendClientMessage(playerid, 0xAA3333AA, "You have not enough money!");
	}
whats wrong in this command? why it's not working? when i type it - nothing happens...
return 1;
}