06.10.2012, 11:41
HI!
I changed the old dcmd for a new command processor zCMD and all of my strcmp commands stopped working.
Here's the OnPlayerCommandText and 1 command:
I changed the old dcmd for a new command processor zCMD and all of my strcmp commands stopped working.
Here's the OnPlayerCommandText and 1 command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Teade: Sa pead sisse logima!");
new giveplayerid, moneys, idx;
idx = 0;
new string[128];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/togpm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(KasutajaInfo[playerid][pDonateRank] > 2 || KasutajaInfo[playerid][pAdmin] > 1)
{
if (!HidePM[playerid])
{
HidePM[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD2, " PMs closed.");
}
else if (HidePM[playerid])
{
HidePM[playerid] = 0;
SendClientMessage(playerid, COLOR_GRAD2, " PMs opened.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User!");
return 1;
}
}
return 1;
}
new veateade[128];
format(veateade, sizeof(veateade), "Unknown command.");
return SendClientMessage(playerid,GREEN,veateade);
}