14.06.2013, 20:45
(
Последний раз редактировалось leomachado; 16.06.2013 в 17:10.
)
Quero quando admin sair de tv nao dar spawn no admin.como posso faser isso, por favor ajuda ai amigos.
meu comando e esse ai.
if(strcmp(cmd, "/tv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк nгo estб autorizado a usar este comando");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(WatchingTV[playerid] < 1)
{
GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]);
}
}
if(Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] >= 1)
{
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
PlayerInfo[playerid][pLocal] = 255;
gTeam[playerid] = 0;
}
tmp = strtok(cmdtext, idx);
if(strcmp("off", tmp, true, strlen(tmp)) == 0)
{
if(WatchingTV[playerid] > 0)
{
WatchingTV[playerid] = 0;
Spectate[playerid] = 253;
GameTextForPlayer(playerid, "~w~ TV~n~~r~ Off", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SetPlayerSkin(playerid,217);
MedicBill[playerid] = 0;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб de TV em Ninguem !");
return 1;
}
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
giveplayerid = ReturnUser(tmp);
new world;
world = GetPlayerVirtualWorld(giveplayerid);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pAdmin] >= 1342 && PlayerInfo[playerid][pAdmin] < 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode ficar de TV em um Admin Dono !");
return 1;
}
Spectate[playerid] = giveplayerid;
new Float:health;
GetPlayerHealth(Spectate[playerid], health);
GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
new cash = GetPlayerMoney(Spectate[playerid]);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerVirtualWorld(playerid,world);
PlayerInfo[playerid][pSpawn] = 0;
format(string, sizeof(string), "Info: (%d) %s R$%d H:%.0f",Spectate[playerid],giveplayer,cash,health);
}
SendClientMessage(playerid, COLOR_GREEN, string);
WatchingTV[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Jogador nгo estб disponivel.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Vocк nгo tem permissгo para usar esse comando!");
return 1;
}
}
return 1;
Nossa niquem sabe fasser isso que quero faser lol.
meu comando e esse ai.
if(strcmp(cmd, "/tv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк nгo estб autorizado a usar este comando");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(WatchingTV[playerid] < 1)
{
GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]);
}
}
if(Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] >= 1)
{
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
PlayerInfo[playerid][pLocal] = 255;
gTeam[playerid] = 0;
}
tmp = strtok(cmdtext, idx);
if(strcmp("off", tmp, true, strlen(tmp)) == 0)
{
if(WatchingTV[playerid] > 0)
{
WatchingTV[playerid] = 0;
Spectate[playerid] = 253;
GameTextForPlayer(playerid, "~w~ TV~n~~r~ Off", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SetPlayerSkin(playerid,217);
MedicBill[playerid] = 0;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб de TV em Ninguem !");
return 1;
}
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
giveplayerid = ReturnUser(tmp);
new world;
world = GetPlayerVirtualWorld(giveplayerid);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pAdmin] >= 1342 && PlayerInfo[playerid][pAdmin] < 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode ficar de TV em um Admin Dono !");
return 1;
}
Spectate[playerid] = giveplayerid;
new Float:health;
GetPlayerHealth(Spectate[playerid], health);
GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
new cash = GetPlayerMoney(Spectate[playerid]);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerVirtualWorld(playerid,world);
PlayerInfo[playerid][pSpawn] = 0;
format(string, sizeof(string), "Info: (%d) %s R$%d H:%.0f",Spectate[playerid],giveplayer,cash,health);
}
SendClientMessage(playerid, COLOR_GREEN, string);
WatchingTV[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Jogador nгo estб disponivel.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Vocк nгo tem permissгo para usar esse comando!");
return 1;
}
}
return 1;
Nossa niquem sabe fasser isso que quero faser lol.