07.12.2010, 10:56
pawn Код:
if (strcmp("/random", cmdtext, true, 6) == 0)
{
if(IsPlayerConnected(playerid))
{
new rand = random(3)+1;
GetPlayerName(playerid, sendername, sizeof(sendername));
new random[MAX_PLAYERS];
if(rand == 1)
{
random = "happy";
}
if(rand == 2)
{
random = "very happy";
}
if(rand == 3)
{
random = "lucky";
}
else
{
random = "sad";
}
format(string, sizeof(string), "A player is %s", random);
ProxDetector(10.0, playerid, string, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
}
return 1;
}