25.11.2011, 20:53
(
Последний раз редактировалось Rob_Maate; 25.11.2011 в 20:56.
Причина: fixed up some of the commands to match ^^
)
pawn Код:
if(strcmp(cmd, "/shout", true) == 0 || strcmp(cmd, "/s", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first.");
return 1;
}
new sendername[64];
sendername = name(playerid)
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: (/s)hout [Local IC]");
return 1;
}
format(string, sizeof(string), "%s Shouts: %s!", sendername, result);
ProxDetector(50.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
printf("%s", string);
}
return 1;
}