23.09.2013, 13:02
Preciso de ajuda nesse evento , o problema й o seguinte , vocк cria o evento normal e quando vocк entra no evento й setado uma skin e a cor do nick muda , quero que quando acabe o evento volte a skin normal e a cor do nick tambйm .
aqui й a parte que seta a skin e a cor do nick
PHP код:
if(strcmp(cmd, "/eventochucky", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 9898 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, trazerx, trazery, trazerz);
LimiteChuck = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerDialog(i, 2449, DIALOG_STYLE_MSGBOX, "{FFFFFF}Eventos {00FF00}Xtreme {FFFF00}VirtuaL {0000FF}LiFe", "\n{FFFFFF}Admin Estб Chamando Voce Para um \nEvento de Chuck Norris! Deseja ir ?", "Sim", "Nao");
OnTrazerChucky[i] = 1;
}
}
if(PlayerInfo[playerid][pTrazerChucky] == 1)
{
SetPlayerPos(playerid,-974.2007,1021.1241,1345.0475);
SetPlayerInterior(playerid,10);
SetPlayerArmour(playerid, 500);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Use /destruirchucky Para Encerrar a Chamada do Evento");
PlayerInfo[playerid][pTrazerChucky] = 0;
return 1;
}
if(OnTrazerChucky[playerid] == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /eventochucky,use /destruirchucky para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/destruirchucky", true) ==0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 2)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(OnTrazerChucky[i] == 1 && IsPlayerConnected(i))
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк destruiu o /eventochucky!");
PlayerInfo[i][pTrazerChucky] = 0;
PlayerInfo[playerid][pTrazerChucky] = 0;
OnTrazerChucky[i] = 0;
SetPlayerSpawn(i);
ResetPlayerWeapons(i);
return 1;
}
}
}
}
PHP код:
if(dialogid == 2449)
{
if(response == 0)
{
SendClientMessage(playerid, COLOR_RED, "Voce Optou por nao ir No Evento de Chucky Norris!");
PlayerInfo[playerid][pTrazerChucky] = 0;
return 1;
}
if(response == 1)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COR_PM,"ERRO* Vocк esta preso e nao pode ir no Evento de Chucky Norris!");
Trazervs[playerid] = 0;
return 0;
}
if(WantedPoints[playerid] > 0)
{
SendClientMessage(playerid,COR_PM,"ERRO* Vocк nгo pode ir no evento estando procurado!");
return 0;
}
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
PlayerInfo[playerid][pTrazerChucky] = 1;
PrimeiroChuck[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Seja Bem vindo ao Evento de Chucky Norris!");
TempoEventoChuck = SetTimerEx("ZerarEventoChuck", 360000, 0, "i", playerid);
if(PrimeiroChuck[playerid] == 1 && LimiteChuck == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Vocк foi o primeiro a entrar no evento e virou o Chucky Norris");
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 38, 9999999);
GivePlayerWeapon(playerid, 27, 9999999);
GivePlayerWeapon(playerid, 30, 9999999);
SetPlayerSkin(playerid,264);
SetPlayerArmour(playerid, 200);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid,0xFF0000FF);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,10);
PlayerInfo[playerid][pInt] = 10;
LimiteChuck = 1;
new rand;
rand = random(sizeof(gChuckEvento));
SetPlayerPos(playerid, gChuckEvento[rand][0], gChuckEvento[rand][1], gChuckEvento[rand][2]);
SetPlayerFacingAngle(playerid, gChuckEvento[rand][3]);
PrimeiroChuck[playerid] = 1;
PlayerInfo[playerid][pTrazerChucky] = 0;
return 1;
}
if(PlayerInfo[playerid][pTrazerChucky] == 1)
{
PrimeiroChuck[playerid] = 0;
SpawnPlayer(playerid);
}
return 1;
}
return 1;
}