CMD:hsms(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == 6) { SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command!"); return 1; } if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4) { SendClientMessage(playerid,COLOR_WHITE, "You're not Hitman Agency member."); return 1; } new string[128]; if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hsms [mole text]"); format(string, sizeof(string), "SMS: %s, Sender: MOLE (555)",params); SendClientMessageToAllEx(COLOR_YELLOW, string); return 1; } |
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not Hitman Agency member."); // <-- This
return 1;
if(PlayerInfo[playerid][pFaction] == 6)
{
SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command!"); // <-- This
return 1;
}
CMD:hsms(playerid, params[])
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
// Here you write what the CMD does if used by a hitman member.
}
else
{
SendClientMessage(playerid,COLOR_WHITE, "You're not Hitman Agency member.");
}
return 1;
}
CMD:hsms(playerid, params[]) if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4) { // Here you write what the CMD does if used by a hitman member. -- HERE } else { SendClientMessage(playerid,COLOR_WHITE, "You're not Hitman Agency member."); } return 1; } |
CMD:hsms(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == 6) { SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command!"); return 1; } if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4) { SendClientMessage(playerid,COLOR_WHITE, "You're not Hitman Agency member."); return 1; } new string[128]; if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hsms [mole text]"); format(string, sizeof(string), "SMS: %s, Sender: MOLE (555)",params); SendClientMessageToAllEx(COLOR_YELLOW, string); return 1; } |
CMD:hsms(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if ((!hsms))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Please try again later, HMA Mole can be submitted every ten minutes.");
return 1;
}
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hmole [contract text]");
SetTimer("hMoleOn", hmoletimer, 0);hmole = 0;
format(string, sizeof(string), "SMS: %s ((/contract)), Sender:HMA (#BLOCKED) ",params);
SendClientMessageToAllEx(COLOR_YELLOW, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You are not a member of the hitman agency!");
return 1;
}
return 1;
}
nah its not working.
I need to define hsms, hmole on hmoletimer.. I need to fix my cmd.. |
forward hMoleOn();
new hmole = 1;
new hmoletimer = 600000; // <-- = 10 minutes
CMD:hmole(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if ((!hsms))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Please try again later, HMA Mole can be submitted every ten minutes.");
return 1;
}
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hmole [contract text]");
SetTimer("hMoleOn", hmoletimer, 0);hmole = 0;
format(string, sizeof(string), "SMS: %s ((/contract)), Sender:HMA (#BLOCKED) ",params);
SendClientMessageToAllEx(COLOR_YELLOW, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You are not a member of the hitman agency!");
return 1;
}
return 1;
}
public hMoleOn()
{
hmole=1;
return 1;
}