20.11.2014, 19:49
pawn Код:
CMD:mduty(playerid, params[])
{
if(Team_Mecanicos(playerid) || Info[playerid][pJob] == 13 || Info[playerid][pJob2] == 13)
{
if(OnDuty[playerid] == 1)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Ahora estбs fuera servicio, ya no recibirбs llamadas.");
OnDuty[playerid] = 0;
Mechanics -= 1;
SetPlayerSkin(playerid, Info[playerid][SavedSkin]); //Le das el skin que estб guardado en la variable Info[playerid][SavedSkin]
}
else
{
if (TransportDuty[playerid] != 0) return SendClientMessageEx(playerid,COLOR_GREY,"Tienes que estar fuera de servicio como chofer de transporte primero.");
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Ahora estбs en servicio, recibirбs llamadas de la gente que te necesite.");
OnDuty[playerid] = 1;
Info[playerid][SavedSkin] = GetPlayerSkin(playerid); //Guardas el skin que tiene en ese momento en la variable Info[playerid][SavedSkin]
SetPlayerSkin(playerid, 50); //Le das el skin 50 al jugador
++Mechanics;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "[ERROR]: No puedes usar este comando porque no eres mecбnico.");
}
return 1;
}