This is Cool
Умник
Я делал:
Во что получилось:
PHP:
if(strcmp(cmd, "/v", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[30];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "{00CC00}[Подсказка]{FFFFFF}: /v [текст]");
return 1;
}
format(string, sizeof(string), "Военнослужащий: %s[%d] сказал: %s!", sendername,playerid, result);
SetPlayerChatBubble(playerid, result, COLOR_RED, 50.0, 10000);//
ProxDetector(40.0, playerid, string, COLOR_RED);
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
ApplyAnimation(playerid,"RIOT","RIOT_shout",4.0,0,0,0,0,0);
JustShout[playerid] = 1;
SetTimerEx("ShoutReset", 1000, false, "i", playerid);
}
}
return 1;
}
PHP:
(4078) : warning 202: number of arguments does not match definition
(4078) : warning 202: number of arguments does not match definition
(4078) : warning 202: number of arguments does not match definition
(4078) : warning 202: number of arguments does not match definition
: warning 217: loose indentation
(4083) : warning 217: loose indentation
(28925) : error 017: undefined symbol "BigEar"
(28925) : warning 215: expression has no effect
(28925) : error 001: expected token: ";", but found "]"
(28925) : error 029: invalid expression, assumed zero
(28925) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Последнее редактирование модератором:
