if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(JustReported[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Wait 10 seconds after sending a next report!");
return 1;
}
giveplayerid = ReturnUser(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(AdminDutyStatus[giveplayerid] = 0)
{
SendClientMessage(playerid, COLOR_WHITE,"That admin is not on duty! See /admins");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "[Help] /report [admin name] [text]");
return 1;
}
JustReported[playerid] = 1;
SetTimerEx("ReportReset", 10000, false, "i", playerid);
format(string, sizeof(string), "Report from [%d]%s: %s",playerid, sendername, (result));
SendClientMessage(giveplayerid,COLOR_LIGHTYELLOW,string);
SendClientMessage(playerid, COLOR_YELLOW, "Your Report Message was sent to the Admins.");
}
return 1;
}
|
You're "Scripting for free & Paypal money" and creating a Roleplay gamemode from scratch using low efficent codes such as strcmp w/ strtok? Its 2011!!! ZCMD, YCMD and sscanf are here and you bother to just simply use perhaps copied code if you're not knowing what you're doing...
Sorry but yeah, I might of not helped you but keep your gamemode fast & efficient will you? |
|
Everything I request in Scripting Discussion is with the gamemode I use for my community, Real Roleplay. I'm scripting a gamemode from scratch for another community and it's using ZCMD. I do only request little help for that, and everything I publicly released is using ZCMD. So please, shut up.
|