23.11.2016, 20:55
Bom primeiro bom dia boa tarde boa noite eu queria ajudar para editar o comando de olhar q esta abaixo e deixa como esta no print alquem poderia me ajudar
PHP код:
dcmd_olhar(playerid, params[]) // exemplo de comando com 1 parвmetro
{
if(Player[playerid][pAdmin] < 1)
return 0; // player nao tem lvl suficiente
else
{
new tmp[256], idx, specid;
tmp = strtok(params, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COR_ERRO, "[ERRO] /olhar 'ID'");
return 1;
}
if(strcmp(tmp, "off", true)==0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING )
{
StopSpectate(playerid);
return 1;
}
else
{
return SendClientMessage(playerid, COR_ERRO, "LOG: [ERRO] Vocк nгo estб olhando ninguйm.");
}
}
if(!IsNumeric(params))
specid = ReturnPlayerID(params);
else
specid = strval(params);
if(!IsPlayerConnected(specid)) {
SendClientMessage(playerid, COR_GREY, "[ERRO] Jogador nгo encontrado.");
return 1;
}
else if(specid == playerid) {
SendClientMessage(playerid, COR_GREY, "LOG: [ERRO] ID Invбlido.");
return 1;
}
else if(GetPlayerState(specid) == PLAYER_STATE_SPECTATING && Player[specid][gSpectateID] != INVALID_PLAYER_ID) {
SendClientMessage(playerid, COR_GREY, "LOG: [ERRO] Vocй escolhido O Jogador %s para entrar em modo espectando.");
return 1;
}
else if(GetPlayerState(specid) != 1 && GetPlayerState(specid) != 2 && GetPlayerState(specid) != 3) {
SendClientMessage(playerid, COR_GREY, "LOG: [ERRO] O jogador nгo estб jogando.");
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
SaveVariables(playerid);
SendClientMessage(playerid, COR_RED, "ADM:» Vocк esta estб de espectador no jogador %s (id: %d) /olhar off.",playerid, getPName(playerid));
}
StartSpectate(playerid, specid);
}
return 1;
}