CB:TLP(playerid) {
new prof[60], Text3D:LabelPlayer[MAX_PLAYERS];
format(prof, sizeof(prof), PASTA_CONTAS, GetName(playerid));
if (DOF2_GetInt(prof, "Profissao") == 0) {
Create3DTextLabel("Desempregado", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 1) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Taxista", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 2) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Assaltante", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 3) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Seguranзa", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 4) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Carteiro", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 5) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Caminhoneiro", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 6) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Mйdico", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 7) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Mecвnico", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 8) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Advogado", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 9) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Aposentado", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 10) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Policial Militar", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 11) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Policial Civil", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 12) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Membro da Interpol", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 13) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Policial Federal", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 14) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Membro da F.B.I", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 15) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Membro da S.W.A.T", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 16) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Policial Rodoviбrio", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 17) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Sequestrador", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 18) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Motorista Particular", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 19) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Mendingo", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (DOF2_GetInt(prof, "Profissao") == 20) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("Jornalista", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (IsAdmin[playerid] == 1) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("- Adminstrador -", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
else if (IsVip[playerid] == 1) {
Delete3DTextLabel(LabelPlayer[playerid]);
Create3DTextLabel("- Vip -", -1, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(LabelPlayer[playerid], playerid, 0.0, 0.0, 0.7);
}
return 1;
}
Delete3DTextLabel(LabelPlayer[playerid]);
//Delete3DTextLabel(LabelPlayer[playerid]);
Ok Vou testar /\
#Mas apareceu outro bug aqui.. quando eu morro o player nгo spawna .. entгo e eu tenho q usar spawn player no onplayerdeath.. sendo assim quando morre ele faz um flood no chatkill.. |
public OnPlayerRequestSpawn(playerid)
{
return 0;
}
public OnPlayerRequestClass(playerid, classid)
{
return 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
AtualizarCores(playerid);
SpawnPlayer(playerid);
if(IsPlayerInPSkate(playerid))
{
Dominando[playerid] = 0;
ProvocouSkate[playerid] = 0;
}
return 0;
}
Sim ,na onplayer death request class / spawn
pawn Код:
|