13.06.2013, 00:50
pawn Код:
Fica Bugando Assim: Uso correto: /cnn [texto]
pawn Код:
COMMAND:cnn(playerid, params[])
{
new cmd[256], cmdtext[256], VVString[256], idx;
cmd = strtok(cmdtext, idx);
//------------------------------------------------------------------------//
if(IsPlayerAdmin(playerid) == 0) return 0;
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, COR_VERMELHO, "Uso correto: /cnn [texto]");
return 1;
}
format(VVString, sizeof(VVString), "~b~%s: ~w~%s",nome(playerid), result);
for(new i = 0; i < MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
{
GameTextForPlayer(i, VVString, 5000, 5);
}
return 1;
}