06.07.2012, 03:18
Resulta que cuando estamos los administradores on y nos ponemos duty todo va bien pero al momento de ponerse off , todos los que se pongan off estan con el mismo eskin (otro diferente al duty)
como arreglo eso,puse un sistema para que cuando se ponga off vuelva al skin que tenia pero antes me funcionaba ahora no,
ejemplo el administrador 1 tiene el skin 114 off , va se pone off y vuelve a su skin que tenia voy yo me pongo off y tambien tengo ese skin ,wtf?,alguien em ayuda?
CMD:aduty(playerid) //Doesnt need params function
{
if(Info[playerid][pAdminZC] >=1 || IsPlayerAdmin(playerid)) //If you use rcon admin delete (PlayerInfo[playerid][pAdmin] >=1 ||
{
if (aDuty[playerid] == 0) //Check if player is on duty
{
new string[128];
new Float,Float:y,Float:z;
new Text3D:label = Create3DTextLabel("", COLOR_GREEN2,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position
GetPlayerPos(playerid,x,y,z); //Looks for players position
SetHP(playerid, INFINITY_HEALTH);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid,COLOR_DRED); //set admin colour red
SetPlayerColor(playerid,COLOR_GREEN2);
skinadminantesdeduty = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 217); // Skin staff
AntiAbusos[playerid] = 1;//Cuando la variable esta en 1 dejara usar los comandos
format(string,sizeof(string), "{FFFFFF}VCRP - {0ADB34}%s Esta ahora de servicio administrativo!{FFFFFF} - {FFFFFF}VCRP",GetPlayerNameEx(playerid)); //here you format string to send to players
SendClientMessageToAll(COLOR_GREEN2,string); //send string to players
SendClientMessage(playerid,COLOR_GREEN2,"{FFFFFF}A hora estas {0ADB34}duty{FFFFFF} y no podras rolear!"); //Tell admin he is now on duty
Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player
aDuty[playerid] = 1; //Set player on duty
}
else if (aDuty[playerid] == 1) //Check if player is on duty
{
new string[128];
new Float,Float:y,Float:z;
new Text3D:label = Create3DTextLabel("", COLOR_WHITE,x,y,z, 40.0, 0, 0);
Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!"
SetPlayerHealth(playerid,100); //sets player health back to 100
SetPlayerSkin(playerid, skinadminantesdeduty);
SetPlayerColor(playerid,COLOR_WHITE);
AntiAbusos[playerid] = 0;//Cuando la variable esta en 0 NO dejara usar los comandos
format(string,sizeof(string)," {FFFFFF}VCRP - {D71C1C}%s Dejу el servicio administrativo!{FFFFFF} - {FFFFFF}VCRP",GetPlayerNameEx(playerid)); //Format string to send to players
SendClientMessageToAll(COLOR_DRED,string); //send players string
SendClientMessage(playerid, COLOR_DRED,"{FFFFFF}Dejastes de estar {D71C1C}duty{FFFFFF} ,no agas AA y a rolear se a dicho!"); //send admin message he is off duty
aDuty[playerid] = 0; //sets admin off duty
}
}
else
SendClientMessage(playerid,COLOR_DRED,"Tu no eres administrador!"); //Error message to send to players who arent admins
return 1;
}
como arreglo eso,puse un sistema para que cuando se ponga off vuelva al skin que tenia pero antes me funcionaba ahora no,
ejemplo el administrador 1 tiene el skin 114 off , va se pone off y vuelve a su skin que tenia voy yo me pongo off y tambien tengo ese skin ,wtf?,alguien em ayuda?
CMD:aduty(playerid) //Doesnt need params function
{
if(Info[playerid][pAdminZC] >=1 || IsPlayerAdmin(playerid)) //If you use rcon admin delete (PlayerInfo[playerid][pAdmin] >=1 ||
{
if (aDuty[playerid] == 0) //Check if player is on duty
{
new string[128];
new Float,Float:y,Float:z;
new Text3D:label = Create3DTextLabel("", COLOR_GREEN2,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position
GetPlayerPos(playerid,x,y,z); //Looks for players position
SetHP(playerid, INFINITY_HEALTH);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid,COLOR_DRED); //set admin colour red
SetPlayerColor(playerid,COLOR_GREEN2);
skinadminantesdeduty = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 217); // Skin staff
AntiAbusos[playerid] = 1;//Cuando la variable esta en 1 dejara usar los comandos
format(string,sizeof(string), "{FFFFFF}VCRP - {0ADB34}%s Esta ahora de servicio administrativo!{FFFFFF} - {FFFFFF}VCRP",GetPlayerNameEx(playerid)); //here you format string to send to players
SendClientMessageToAll(COLOR_GREEN2,string); //send string to players
SendClientMessage(playerid,COLOR_GREEN2,"{FFFFFF}A hora estas {0ADB34}duty{FFFFFF} y no podras rolear!"); //Tell admin he is now on duty
Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player
aDuty[playerid] = 1; //Set player on duty
}
else if (aDuty[playerid] == 1) //Check if player is on duty
{
new string[128];
new Float,Float:y,Float:z;
new Text3D:label = Create3DTextLabel("", COLOR_WHITE,x,y,z, 40.0, 0, 0);
Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!"
SetPlayerHealth(playerid,100); //sets player health back to 100
SetPlayerSkin(playerid, skinadminantesdeduty);
SetPlayerColor(playerid,COLOR_WHITE);
AntiAbusos[playerid] = 0;//Cuando la variable esta en 0 NO dejara usar los comandos
format(string,sizeof(string)," {FFFFFF}VCRP - {D71C1C}%s Dejу el servicio administrativo!{FFFFFF} - {FFFFFF}VCRP",GetPlayerNameEx(playerid)); //Format string to send to players
SendClientMessageToAll(COLOR_DRED,string); //send players string
SendClientMessage(playerid, COLOR_DRED,"{FFFFFF}Dejastes de estar {D71C1C}duty{FFFFFF} ,no agas AA y a rolear se a dicho!"); //send admin message he is off duty
aDuty[playerid] = 0; //sets admin off duty
}
}
else
SendClientMessage(playerid,COLOR_DRED,"Tu no eres administrador!"); //Error message to send to players who arent admins
return 1;
}