26.06.2011, 21:52
(
Последний раз редактировалось Shadoww5; 27.06.2011 в 00:23.
)
PHP код:
forward Soltar(playerid);
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/bangu", true) == 0)
{
new tmp[256], preso, tempo, aname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
preso = strval(tmp);
tmp = strtok(cmdtext, idx);
tempo = strval(tmp);
GetPlayerName(preso, aname, sizeof MAX_PLAYER_NAME);
GetPlayerName(playerid, name, sizeof MAX_PLAYER_NAME);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "/bangu [PlayerID] [Tempo]");
format(string, sizeof(string), "%s [ID %d] Foi mandado para BANGU pelo Administrador %s.", aname, preso, name);
SendClientMessageToAll(0xFF0000FF, string);
SetPlayerHealth(preso, 100); //Vida
ResetPlayerWeapons(preso); //Reset Armas
GameTextForPlayer(preso,"~w~Bem vindo para o ~r~BANGU.~n~Repense suas atitudes !",4000,1); //Mensagem
SetPlayerPos(preso,-290.6174,1517.4943,75.3593); //Local
SetPlayerInterior(preso, 0); //InteriorID
SetPlayerSkin(preso, 26); //Skin de prisгo
SetTimerEx("Soltar", tempo, false, "i", preso);
return 1;
}
return 0;
}
public Soltar(playerid)
{
SpawnPlayer(playerid);
GameTextForPlayer(playerid,"~w~Vocк acaba de ser solto do ~r~BANGU !",4000,1);
return 1;
}