pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)){
if(!strfind(PlayerName(playerid),ZOMBIE_NAME,true)){
SetupZombie(playerid);
return 1;
}
}
if(ZombieKill[playerid] != -1){
Zombies[ZombieKill[playerid]][ZombieKilling] = -1;
ZombieKill[playerid] = -1;
//return 1;
}
TextDrawHideForPlayer(playerid, statu[gSpectateID[playerid]]);
TextDrawHideForPlayer(playerid, velo[playerid]);
if(pAdmin[playerid] > 1){
//SetPlayer
}
if(PlayerInfo[playerid][Logged] == 0){
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "CONTA", STRX, "Logar", "Sair");
}
emcasa[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
Trocar[playerid]=0;
autoescola[playerid] = 0;
Trocara[playerid]=0;
autoaerea[playerid] = 0;
autonautica[playerid] = 0;
Trocarn[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
SetSpawnInfo(playerid, 1, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TextDrawHideForPlayer(playerid, drogas1);
TextDrawHideForPlayer(playerid, drogas2);
//TextDrawShowForPlayer(playerid, gText2[playerid]);
SetPlayerInterior(playerid,0);
ClosedSelection[playerid]=0;
SkinClass[playerid][SpawnAngle] = 0.0;
SkinClass[playerid][SpawnDance] = true;
KillTimer( SkinClass[playerid][SpawnTimer] );
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
SetCameraBehindPlayer(playerid);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); //
GangZoneShowForPlayer(playerid,favela,0xFF0000AA);
GangZoneShowForPlayer(playerid,areadmlv, 0xFF000096);
GangZoneShowForPlayer(playerid,carga, 0x00FFFFAA);
GangZoneShowForPlayer(playerid,descarga, 0x80FFFFAA);
GangZoneShowForPlayer(playerid, AreaDrogas, 0xFF8040AA);
GangZoneShowForPlayer(playerid, CargaCaminhoneiro, 0x0080405B);
GangZoneShowForPlayer(playerid, DescargaCaminhoneiro, 0x0080405B);
GangZoneShowForPlayer(playerid, CargaPetroleiro, 0x8000FF63);
gmod[playerid] = 0;
noevento[playerid] = 0;
GPS_Spawned[playerid] = 1;
nogame[playerid] = 0;
Logarprof(playerid);
autoescola[playerid] = 0;
autoaerea[playerid] = 0;
autonautica[playerid] = 0;
Trocarn[playerid] = 0;
Trocara[playerid] = 0;
prefls[playerid] = 0;
prefsf[playerid] = 0;
preflv[playerid] = 0;
nobarls[playerid] = 0;
nobarsf[playerid] = 0;
nobarlv[playerid] = 0;
nobarfc[playerid] = 0;
nautlls[playerid] = 0;
algemado[playerid] = 0;
sequestro[playerid] = 0;
vercmds[playerid]=0;
verpms[playerid]=0;
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
dini_IntSet(file, "MN", 0);
dini_IntSet(file, "LClan", 0);
//fim
if(pAdmin[playerid] == 0){
admin[playerid] = 0;
dini_IntSet(file, "aAdmin", 0);
}
if(pAdmin[playerid] == 1 ){
admin[playerid] = 1;
}
if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
admin[playerid] = 1;
dini_IntSet(file, "aAdmin", 1);
}
if(dini_Int(file, "VIP") == 1){
vip[playerid] = 1;
SetPlayerMapIcon(playerid, 1, 1568.0254,-1896.3612,13.5605, 23, 0); //Bar Vip LS
//SetPlayerMapIcon(playerid, 2, -2155.2612,645.3902,52.3672, 23, 0); //Bar Vip SF
//SetPlayerMapIcon(playerid, 3, 2489.9238,2063.7310,10.8203, 23, 0); //Bar VIP LV
SendClientMessage(playerid, Amarelo, "{669900}| INFO-VIP | {CC00CC}Vocк й um jogador {CCFF00}[VIP] {CC00CC}aproveite!");
}
if(dini_Int(file, "VIP") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "VIPPRATA") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "Procurado") == 1){
Procurados[playerid]= 1;
}
if(dini_Int(file, "Procurado") == 0){
Procurados[playerid]= 0;
}
if(dini_Int(file, "Lutas") == 1){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(dini_Int(file, "Lutas") == 2){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(dini_Int(file, "Lutas") == 3){
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(dini_Int(file, "Lutas") == 4){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(dini_Int(file, "Lutas") == 5){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(dini_Int(file, "Lutas") == 6){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(dini_Int(file,"novato") == 1){
new ip2[128];
GetPlayerIp(playerid,ip2,128);
dini_IntSet(file, "Skin", 0);
SetTimerEx("tuto2", 5000, 0, "d", playerid);
//dini_IntSet(file,"novato",0);
}
if(dini_Int(file, "Sequestrado") == 1){
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, -10.6667,2329.0613,24.3034);
SendClientMessage(playerid, msgdm, "(CATIVEIRO) Vocк foi sequestrado, pague o resgate ou aguarde as autoridades.");
sequestrado[playerid] = 1;
}
if(dini_Int(file, "Preso") == 1){
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(playerid, 6);
SendClientMessage(playerid, msgdm, "(CADEIA) Vocк estб preso, para ser solto consulte um advogado ou pague fianзa.");
preso[playerid] = 1;
dini_IntSet(file, "ofmaconha", 0);
dini_IntSet(file, "ofcocaina", 0);
dini_IntSet(file, "ofcrack", 0);
dini_IntSet(file, "usoudroga", 0);
dini_IntSet(file, "tmaconha", 0);
dini_IntSet(file, "tcrack", 0);
dini_IntSet(file, "tcocaina", 0);
dini_IntSet(file, "Maconha", 0);
dini_IntSet(file, "Crack", 0);
dini_IntSet(file, "Cocaina", 0);
}
if(dini_Int(file,"CapaceteOn") == 1){
switch(GetPlayerSkin(playerid))
{
#define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, 3, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
}
}
SetSpawnInfo(playerid, 1, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 354.1657, 0, 0, 0, 0, 0, 0);
return 1;
}