COMMAND:20(playerid, params[])
{
SendAdminText(playerid, "/20", params);
if (APlayerData[playerid][LoggedIn] == true)
{
new Zona[128], Name[24];
GetPlayerName(playerid, Name, sizeof(Name));
case ClassTruckDriver://LINEA de error
{
format(Zona, sizeof(Zona), "{FFF700}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassBusDriver:
{
format(Zona, sizeof(Zona), "{FFB300}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassPilot:
format(Zona, sizeof(Zona), "{00FFE2}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassPolice:
{
format(Zona, sizeof(Zona), "{0022FF}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassMafia:
{
format(Zona, sizeof(Zona), "{8A0886}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassCourier:
{
format(Zona, sizeof(Zona), "{4DF43E}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassAssistance:
{
format(Zona, sizeof(Zona), "{09692E}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
case ClassRoadWorker:
{
format(Zona, sizeof(Zona), "{787612}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
}
return 1;
}
pero tengo un problema yo ya se que tengo que usar switch,, pero como lo uso, como tengo que ponerlo ?
|
switch(GetPlayerSkin(playerid))
{
case 0,5,6,7://Skins id, cada uno separado x coma
{
format(Zona, sizeof(Zona), "{FFF700}%s: {FFFFFF}10-20 %s", Name, GetPlayerZone(playerid));
SendClientMessageToAll(0xFFFFFF, Zona);
}
}