HALP!!!!
#1

im trying to make a /n or /new for my RP server it works but people can spam it how do i set a 30 second timer on it? this is what i got so far please halp!
Quote:

if(strcmp(cmd, "/n", true) == 0 || strcmp(cmd, "/new", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}

if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/n)ew [Newbie Chat]");
return 1;
}
format(string, sizeof(string), " Player %s: %s " , sendername, result);
OOCOff(0x33CCFFAA,string);
printf("%s", string);
}
return 1;
}

Reply
#2

I can't really help you, but i think that you would need to add an /mute system for it.
Reply
#3

how would i add a /mute system to it?
Reply
#4

maybe use a timer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)