04.02.2012, 08:02
hi, I made some jobs and some from then is mechanic and medic, and I made cmd for every one for can call them /medic and /mechanic and I made some time ago a cmd /me <message> for shout for all players but when I use /mechanic or /medic I get cmd /me, what to do?
help plz
pawn Код:
if(!strcmp(cmdtext, "/me", true, 3)) if(Logged[playerid] == 1)
{
new string[256];
new str[256];
if(ShitInfo[playerid][pMe] > 1)
{
format(string, 256, "( ! ) You have to wait %d seconds before shout or action", ShitInfo[playerid][pMe]);
SendClientMessage(playerid, c_r, string); return 1;
}
if(cmdtext[3] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "( ! ) /me <message>");
return 1;
}
else
{
format(str, sizeof(str), "( ! ) %s: %s",PlayerName(playerid) , cmdtext[4]);
SendClientMessageToAll(GetPlayerColor(playerid), str);
ShitInfo[playerid][pMe] = 20;
}
return 1;
}
if(strcmp(cmd,"/medic",true) == 0)
{
new string[256];
if(GetPlayerJobID(playerid) == 8) return 1;
awesomeguy3 = GetPlayerID(PlayerName(playerid));
if(CalledME[playerid] == 1) return SendClientMessage(playerid,c_r,"( ! ) You already called for a medic !");
format(string,sizeof(string),"( ! ) %s[%d] has called for a medic ! /acceptcall <id> to accept !",PlayerName(playerid),playerid);
SendClientMessageToTeam(TEAM_MEDIC,TEAM_MEDIC_COLOR,string);
SendClientMessage(playerid,COLOR_GREEN,"( ! ) Call sent ! /cmedic to cancel call !");
CalledME[playerid] = 1;
return 1;
}
if(strcmp(cmd, "/mechanic", true) == 0)
{
new string[256];
if(GetPlayerJobID(playerid) == 5) return 1;
awesomeguy4 = GetPlayerID(PlayerName(playerid));
if(CalledM[playerid] == 1) return SendClientMessage(playerid,c_r,"( ! ) You already called for a mechanic !");
format(string,sizeof(string),"( ! ) %s[%d] has called for a mechanic ! /acceptcall <id> to accept !",PlayerName(playerid),playerid);
SendClientMessageToTeam(TEAM_MECHANIC,TEAM_MECHANIC_COLOR,string);
SendClientMessage(playerid,COLOR_GREEN,"( ! ) Call sent ! /cmechanic to cancel call !");
CalledM[playerid] = 1;
return 1;
}