30.09.2010, 16:46
(
Последний раз редактировалось Homer_Tihuana; 30.09.2010 в 17:50.
)
pawn Код:
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)
{
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]);
}
}
//new hkey = PlayerInfo[playerid][pPHousekey];
//new house = PlayerInfo[playerid][pLocal];
if(Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] >= 1/*PlayerInfo[playerid][pLocal] != 255 || Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] > 0*/)
{
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);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Voce nao esta assistindo a TELEVISAO !");
return 1;
}
}
/*if(PlayerInfo[playerid][pAdmin] < 1)
{
if(house == 255)
{
GameTextForPlayer(playerid, "~r~Voce nao possui uma TV", 5000, 1);
return 1;
}
}*/
if(PlayerInfo[playerid][pAdmin] >= 1 /*|| PlayerToPoint(12.0, playerid, HouseInfo[hkey][hExitx], HouseInfo[hkey][hExity],HouseInfo[hkey][hExitz])*/)
{
/*if(HouseInfo[hkey][hHealthx] != 1)
{
GameTextForPlayer(playerid, "~r~Esta atualizacao nao e instalada", 5000, 1);
return 1;
}*/
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
Spectate[playerid] = giveplayerid;
new Float:health;
GetPlayerHealth(Spectate[playerid], health);
GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
new cash = GetPlayerMoneyEx(Spectate[playerid]);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "Info: (%d) %s R$%d H:%.0f",Spectate[playerid],giveplayer,cash,health);
}
else
{
SetPlayerToTeamColor(playerid);
format(string, sizeof(string), "UAV: (%d) %s",Spectate[playerid],giveplayer);
}
SendClientMessage(playerid, COLOR_GREEN, string);
WatchingTV[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Objetivo nгo estб disponivel.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Vocк nгo estб em sua Casa !");
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/cadeia", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [ id ] [time(minutes)]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк prendeu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Vocк foi preso pelo Admin %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "Vocк foi preso por %d Minutos em Praзa Publica. motivo: unknow", money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}