16.11.2011, 21:51
pawn Код:
if(strcmp(cmd, "/bomba", true) == 0 || strcmp(cmd, "/atomica", true) == 0)
{
format(string, sizeof(string),"%s [ID: %d] estб plantando uma bomba atomica");
SendClientMessageToAll(0x0080C0AA,string);
SendClientMessage(playerid,0x0080C0AA,"Fique 4 minutos sem morrer que a bomba atomica irб explodir");
BombaAtomica[playerid] = 1;
return 1;
}
return 0;
}
stock radiacao(Float:tamanho, Float:x,Float:y,Float:z,string[],cor)
{
new Float:tempposx, Float:tempposy, Float:tempposz;
new Float:posx, Float:posy, Float:posz;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (x -posx);
tempposy = (y -posy);
tempposz = (z -posz);
if (((tempposx < tamanho/16) && (tempposx > -tamanho/16)) && ((tempposy < tamanho/16) && (tempposy > -tamanho/16)) && ((tempposz < tamanho/16) && (tempposz > -tamanho/16)))
{
SendClientMessage(i, cor, string);
}
else if (((tempposx < tamanho/8) && (tempposx > -tamanho/8)) && ((tempposy < tamanho/8) && (tempposy > -tamanho/8)) && ((tempposz < tamanho/8) && (tempposz > -tamanho/8)))
{
SendClientMessage(i, cor, string);
}
else if (((tempposx < tamanho/4) && (tempposx > -tamanho/4)) && ((tempposy < tamanho/4) && (tempposy > -tamanho/4)) && ((tempposz < tamanho/4) && (tempposz > -tamanho/4)))
{
SendClientMessage(i, cor, string);
}
else if (((tempposx < tamanho/2) && (tempposx > -tamanho/2)) && ((tempposy < tamanho/2) && (tempposy > -tamanho/2)) && ((tempposz < tamanho/2) && (tempposz > -tamanho/2)))
{
SendClientMessage(i, cor, string);
}
else if (((tempposx < tamanho) && (tempposx > -tamanho)) && ((tempposy < tamanho) && (tempposy > -tamanho)) && ((tempposz < tamanho) && (tempposz > -tamanho)))
{
SendClientMessage(i, cor, string);
}
}
}
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index]; index++;
}
result[index - offset] = EOS;
return result;
}
pawn Код:
if(gTeam[playerid] == TEAM_T)