Damn /s command
#1

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

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

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

Yeah i need too a full /s script
Reply
#4

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

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

Put your /seat command before the /s command under OnPlayerCommandText.
Reply
#7

None of these are working,

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


Forum Jump:


Users browsing this thread: 1 Guest(s)