[Pedido] Sistema de spec para admin.
#6

Bom cara acho que posso te ajudar ..
Porem й com strcmp ..

PHP код:
if(strcmp(cmd"/spec"true) == 0) {
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), PASTA_CONTASaname);
if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == 5){            // <<< Isso aki й a variavel do Admin
new tmp[256];
tmp strtok(cmdtextidx);
if(!
strlen(tmp)) {
SendClientMessage(playeridVermelho"(ERRO) Digite: /spec [id]");
return 
1;
}
specplayerid strval(tmp);
if(!
IsPlayerConnected(specplayerid)) {
SendClientMessage(playeridVermelho"(ERRO) ID Invбlido.");
return 
1;
}
TogglePlayerSpectating(playerid1);
PlayerSpectatePlayer(playeridspecplayerid);
SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
gSpectateID[playerid] = specplayerid;
gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
return 
1;
}

Agora o Comando para Parar de Espiar

PHP код:
if(strcmp(cmd"/pararspec"true) == 0) {
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), PASTA_CONTASaname);
if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == 5){             // << Variavel do admin
TogglePlayerSpectating(playerid0);
gSpectateID[playerid] = INVALID_PLAYER_ID;
gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
return 
1;
}

Reply


Messages In This Thread
Sistema de spec para admin. - by RafaScripter - 06.01.2013, 16:19
Re: Sistema de spec para admin. - by Lуs - 06.01.2013, 16:22
Re: Sistema de spec para admin. - by HeyHoLetsGo - 06.01.2013, 16:43
Re: Sistema de spec para admin. - by Lуs - 06.01.2013, 16:47
Re: Sistema de spec para admin. - by RafaScripter - 06.01.2013, 16:50
Re: Sistema de spec para admin. - by Equipe - 06.01.2013, 16:58
Re: Sistema de spec para admin. - by Lуs - 06.01.2013, 17:01
Re: Sistema de spec para admin. - by Larceny - 06.01.2013, 17:08
Respuesta: Re: Sistema de spec para admin. - by DKDarkking - 27.05.2015, 18:55

Forum Jump:


Users browsing this thread: 3 Guest(s)