Commands arent working?
#1

I made a /team command

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/team", cmdtext, true, 5) == 0)
        {
			SendClientMessage(playerid, COLOR_WHITE,"LS-RP Team");
   			SendClientMessage(playerid, COLOR_WHITE,"Server/Scripter - Luis");
	        SendClientMessage(playerid, COLOR_WHITE,"Co-Scripter's iViking and Ed");
	        return 1;
        }
        return 0;
}
But i type it IG and it says it is Unknown?
Reply
#2

Try using this;

Код:
    }
        if(!strcmp(cmdtext, "/team", true)) {
 		SendClientMessage(playerid, COLOR_WHITE,"LS-RP Team");
   		SendClientMessage(playerid, COLOR_WHITE,"Server/Scripter - Luis");
	        SendClientMessage(playerid, COLOR_WHITE,"Co-Scripter's iViking and Ed");
        return 1;
    }
Reply
#3

Quote:
Originally Posted by Kevin_Joshen
Посмотреть сообщение
Try using this;

Код:
    }
        if(!strcmp(cmdtext, "/team", true)) {
 		SendClientMessage(playerid, COLOR_WHITE,"LS-RP Team");
   		SendClientMessage(playerid, COLOR_WHITE,"Server/Scripter - Luis");
	        SendClientMessage(playerid, COLOR_WHITE,"Co-Scripter's iViking and Ed");
        return 1;
    }
Still dont work, Idk why.
Reply
#4

what does it say when you compile it? and do you have COLOR_WHITE defined?
Reply
#5

Quote:
Originally Posted by Kevin_Joshen
Посмотреть сообщение
what does it say when you compile it? and do you have COLOR_WHITE defined?
Yes i have it Defined, It has some Warnings but they have nothing to do with the cmds?
Reply
#6

show them thats why
Reply
#7

Quote:
Originally Posted by Kar
Посмотреть сообщение
show them thats why
I dont understand?
Reply
#8

show the warnings..
Reply
#9

Here's the errors
Код:
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(85) : warning 213: tag mismatch
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(85) : warning 202: number of arguments does not match definition
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "BData"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "HouseData"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "IsNumeric"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "PlayerData"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "ReturnUser"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "VehicleData"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "ret_memcpy"
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LS-RP1.pwn(350) : warning 203: symbol is never used: "strtok"
Also i have changed to a /o cmd

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(o, 1, cmdtext);
  return 1;
}

dcmd_o(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /o [chat]");
  new str[256];
  GetPlayerName(playerid, str, sizeof(str));
  format(str, sizeof(str), "%s: %s", str, params);
  SendClientMessageToAll(COLOR_WHITE, str);
  return 1;
}
Reply
#10

line 85 please?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)