02.10.2011, 22:48
FAIL \/ FIZ DOUBLE POST SEM QUERER D:
Tenta ae:
Quote:
Mals a demora estou ocupado, posta a linha do erro manolo. . .
Edit: esquece vou ver o cуdigo denovo pera ai... |
pawn Код:
CMD:vida(playerid, params[])
{
new string [128];
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
return 1;
}
if( sscanf( params, "ud", id, valor[0] ) )
{
SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /vida [id] [vida]");//
return 1;
}
if( IsPlayerConnected(id) )
{
for( new allplayers = 0; allplayers < GetMaxPlayers(); allplayers++)
{
format(string, sizeof(string), "O Admnistrador %s setou a vida de %s para %d.", pNome(playerid), pNome(allplayers), valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerHealth(id, valor[0]);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
return 1;
}
return 1;
}
CMD:setscore(playerid, params[])
{
if( !IsPlayerAdmin(playerid) )
{
SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
return 1;
}
if( sscanf(params, "ud", id, valor[0] ) )
{
SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /setscore [id] [score]");
return 1;
}
if( IsPlayerConnected(id) )
{
format(string, sizeof(string), "O Admnistrador %s setou o score de %s para %d.", pNome(playerid), pNome(id), valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerScore(id, valor[0]);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
return 1;
}
}