SA-MP Forums Archive
Damn /s command - 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: Damn /s command (/showthread.php?tid=109776)



Damn /s command - savage997 - 22.11.2009

Right I have a /s command for shouting. I added it recently but I have found out that now when I do /seat it sais "Savage997 Shouts: at."


This is my shout command
Код:
  if(!strcmp(cmdtext, "/s", true, 2))
  {
    if(!cmdtext[2])return SendClientMessage(playerid, 0xFFFF00AA, "USAGE: /s(hout) [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "%s shouts: %s ", str, cmdtext [3]);
    ProxDetector(50.0, playerid, str, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    return 1;
	}
And this is my seat command
Код:
	if(strcmp(cmdtext, "/seat", true) == 0) {
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
		  ApplyAnimation(playerid,"MISC","SEAT_LR",4.1,0,0,0,1,1);
 	 		return 1;
		}
	}
Can anyone help me out so that both commands work together. Help would be much appriciated.


Re: Damn /s command - Blaze09 - 22.11.2009

Код:
if(strcmp(cmdtext, "/seat", true) == 0) {
You did not put "!" in front of strcmp

Код:
if(!strcmp(cmdtext, "/seat", true) == 0) {



Re: Damn /s command - FakerBG - 22.11.2009

Yeah i need too a full /s script


Re: Damn /s command - savage997 - 22.11.2009

Quote:
Originally Posted by Blaze09
Код:
if(strcmp(cmdtext, "/seat", true) == 0) {
You did not put "!" in front of strcmp

Код:
if(!strcmp(cmdtext, "/seat", true) == 0) {
I did that and it came up with the following error message
warning 213: tag mismatch

Also I went and tried it and it still did the same thing. Any other suggestions?


Re: Damn /s command - dice7 - 22.11.2009

pawn Код:
if(strcmp(cmdtext, "/s", true) == 0) {



Re: Damn /s command - MadeMan - 22.11.2009

Put your /seat command before the /s command under OnPlayerCommandText.


Re: Damn /s command - savage997 - 25.11.2009

None of these are working,

It'll either just shout or just sit niether works together.