[Ajuda] Spawn
#1

toda vez qui eu do algum spawn a skin e setada pra 0


Код HTML:
public OnPlayerSpawn(playerid)
{
	emcasa[playerid] = 0;
	new aname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
	format(file, sizeof(file), PASTA_CONTAS, aname);
	TextDrawHideForPlayer(playerid, topblack);
	TextDrawShowForPlayer(playerid,UPRelogio);
	TextDrawHideForPlayer(playerid, bottomblack);
	TextDrawHideForPlayer(playerid, drogas1);
	TextDrawHideForPlayer(playerid, drogas2);
	TextDrawShowForPlayer(playerid, gText2[playerid]);
	TextDrawHideForPlayer(playerid, ImagemEntrada);
	TextDrawShowForPlayer(playerid,TempoRoYal);
	TextDrawShowForPlayer(playerid, Textdrawemcimadorelogio);
    gettime(HoraRoYal, MinutosRoYal);
    SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
	SetPlayerInterior(playerid,0);
	PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); //
	GangZoneShowForPlayer(playerid,GZMorro,0xFFFFFFAA);
	GangZoneShowForPlayer(playerid,carga, 0x00FFFFAA);
	GangZoneShowForPlayer(playerid,descarga, 0x80FFFFAA);
	GangZoneShowForPlayer(playerid,descargalv, 0x80FFFFAA);
	//variavel
	gmod[playerid] = 0;
	noevento[playerid] = 0;
	GPS_Spawned[playerid] = 1;
	nogame[playerid] = 0;
	Logarprof(playerid);
	autoescola[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);
	//fim
	if(dini_Isset("WantedLevel .ini",PlayerName(playerid))) SetPlayerWantedLevel (playerid,dini_Int("WantedLevel.ini",PlayerName(playerid)));
	if(dini_Isset("skins.ini",PlayerName(playerid))) SetPlayerSkin(playerid,dini_Int("skins.ini",PlayerName(playerid)));
	if(pAdmin[playerid] == 0)
	{
		admin[playerid] = 0;
		dini_IntSet(file, "aAdmin", 0);
	}
	if(Morreu[playerid] == true)
	{
	   SetPlayerSkin(playerid,SkinDeAntes[playerid]);
	   Morreu[playerid] = false;
	}
	if(dini_Int(file, "Procurado") == 1)
	{
		Procurados[playerid]= 1;
	}
	if(dini_Int(file, "Procurado") == 0)
	{
		Procurados[playerid]= 0;
	}
	if(pAdmin[playerid] == 1 )
	{
		admin[playerid] = 1;
	}
	if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6 || pAdmin[playerid] == 7)
	{
		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, verdel, "{FF0000}(INFO) {FFFFFF}Vocк й um jogador VIP, aproveite!");
	}
	if(dini_Int(file, "VIP") == 0)
	{
		vip[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,"novatoLS") == 1)
	{
		new string22[128];
		new ip2[128];
		GetPlayerIp(playerid,ip2,128);
		format(string22, sizeof(string22), "Seu nick:{FFFFFF} %s {00FF00}» {6666FF}Seu ID: {FFFFFF}%d ", aname,playerid);
		SendClientMessage(playerid, Vermelho, string22);
		ShowPlayerDialog(playerid, Regras, DIALOG_STYLE_MSGBOX, "Bem-Vindo", "~> Vocк nascerб em Los Santos\n~> Va ate a Agencai De Empregos e pegue um emprego\n~> Troque skins no simbolo da ''Camisa'' em Los Santos\n~> Nгo comete DM fora da favela pois sera preso\n~> Nгo cometa DM,Nгo xingue,Nгo peзa ADM,Nгo use xiters\n~> CONCORDA?.", "Concordo", "Discordo");
	}
	if(dini_Int(file, "Preso") == 1)
	{
		SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
		SetPlayerInterior(playerid, 6);
		SetPlayerHealth(playerid,99999);
		ResetPlayerWeapons(playerid);
		TogglePlayerControllable(playerid, 1);
		SendClientMessage(playerid, Vermelho, "(INFO) {FFFFFF}Vocк estб preso. Para ser solto, contrate um advogado ou pague a fianзa /fianca");
		preso[playerid] = 1;
		dini_IntSet(file2, "ofmaconha", 0);
		dini_IntSet(file2, "ofcocaina", 0);
		dini_IntSet(file2, "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);
	}
	return 1;
}
Reply
#2

Manda o OnPlayerSpawn.
Reply
#3

Код HTML:
public OnPlayerSpawn(playerid)
{
	emcasa[playerid] = 0;
	new aname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
	format(file, sizeof(file), PASTA_CONTAS, aname);
	TextDrawHideForPlayer(playerid, topblack);
	TextDrawShowForPlayer(playerid,UPRelogio);
	TextDrawHideForPlayer(playerid, bottomblack);
	TextDrawHideForPlayer(playerid, drogas1);
	TextDrawHideForPlayer(playerid, drogas2);
	TextDrawShowForPlayer(playerid, gText2[playerid]);
	TextDrawHideForPlayer(playerid, ImagemEntrada);
	TextDrawShowForPlayer(playerid,TempoRoYal);
	TextDrawShowForPlayer(playerid, Textdrawemcimadorelogio);
    gettime(HoraRoYal, MinutosRoYal);
    SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
	SetPlayerInterior(playerid,0);
	PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); //
	GangZoneShowForPlayer(playerid,GZMorro,0xFFFFFFAA);
	GangZoneShowForPlayer(playerid,carga, 0x00FFFFAA);
	GangZoneShowForPlayer(playerid,descarga, 0x80FFFFAA);
	GangZoneShowForPlayer(playerid,descargalv, 0x80FFFFAA);
	//variavel
	gmod[playerid] = 0;
	noevento[playerid] = 0;
	GPS_Spawned[playerid] = 1;
	nogame[playerid] = 0;
	Logarprof(playerid);
	autoescola[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);
	//fim
	if(dini_Isset("WantedLevel .ini",PlayerName(playerid))) SetPlayerWantedLevel (playerid,dini_Int("WantedLevel.ini",PlayerName(playerid)));
	if(dini_Isset("skins.ini",PlayerName(playerid))) SetPlayerSkin(playerid,dini_Int("skins.ini",PlayerName(playerid)));
	if(pAdmin[playerid] == 0)
	{
		admin[playerid] = 0;
		dini_IntSet(file, "aAdmin", 0);
	}
	if(Morreu[playerid] == true)
	{
	   SetPlayerSkin(playerid,SkinDeAntes[playerid]);
	   Morreu[playerid] = false;
	}
	if(dini_Int(file, "Procurado") == 1)
	{
		Procurados[playerid]= 1;
	}
	if(dini_Int(file, "Procurado") == 0)
	{
		Procurados[playerid]= 0;
	}
	if(pAdmin[playerid] == 1 )
	{
		admin[playerid] = 1;
	}
	if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6 || pAdmin[playerid] == 7)
	{
		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, verdel, "{FF0000}(INFO) {FFFFFF}Vocк й um jogador VIP, aproveite!");
	}
	if(dini_Int(file, "VIP") == 0)
	{
		vip[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,"novatoLS") == 1)
	{
		new string22[128];
		new ip2[128];
		GetPlayerIp(playerid,ip2,128);
		format(string22, sizeof(string22), "Seu nick:{FFFFFF} %s {00FF00}» {6666FF}Seu ID: {FFFFFF}%d ", aname,playerid);
		SendClientMessage(playerid, Vermelho, string22);
		ShowPlayerDialog(playerid, Regras, DIALOG_STYLE_MSGBOX, "Bem-Vindo", "~> Vocк nascerб em Los Santos\n~> Va ate a Agencai De Empregos e pegue um emprego\n~> Troque skins no simbolo da ''Camisa'' em Los Santos\n~> Nгo comete DM fora da favela pois sera preso\n~> Nгo cometa DM,Nгo xingue,Nгo peзa ADM,Nгo use xiters\n~> CONCORDA?.", "Concordo", "Discordo");
	}
	if(dini_Int(file, "Preso") == 1)
	{
		SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
		SetPlayerInterior(playerid, 6);
		SetPlayerHealth(playerid,99999);
		ResetPlayerWeapons(playerid);
		TogglePlayerControllable(playerid, 1);
		SendClientMessage(playerid, Vermelho, "(INFO) {FFFFFF}Vocк estб preso. Para ser solto, contrate um advogado ou pague a fianзa /fianca");
		preso[playerid] = 1;
		dini_IntSet(file2, "ofmaconha", 0);
		dini_IntSet(file2, "ofcocaina", 0);
		dini_IntSet(file2, "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);
	}
	return 1;
}
Reply
#4

vc usa a variavel:
pawn Код:
SkinDeAntes[playerid]
em algum lugar? comando?

e

colocou a
pawn Код:
Morreu[playerid] = true;
no OnPlayerDeath ?
Reply
#5

pawn Код:
public OnPlayerSpawn(playerid)
{
    emcasa[playerid] = 0;
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONTAS, aname);
    TextDrawHideForPlayer(playerid, topblack);
    TextDrawShowForPlayer(playerid,UPRelogio);
    TextDrawHideForPlayer(playerid, bottomblack);
    TextDrawHideForPlayer(playerid, drogas1);
    TextDrawHideForPlayer(playerid, drogas2);
    TextDrawShowForPlayer(playerid, gText2[playerid]);
    TextDrawHideForPlayer(playerid, ImagemEntrada);
    TextDrawShowForPlayer(playerid,TempoRoYal);
    TextDrawShowForPlayer(playerid, Textdrawemcimadorelogio);
    gettime(HoraRoYal, MinutosRoYal);
    SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
    SetPlayerInterior(playerid,0);
    PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); //
    GangZoneShowForPlayer(playerid,GZMorro,0xFFFFFFAA);
    GangZoneShowForPlayer(playerid,carga, 0x00FFFFAA);
    GangZoneShowForPlayer(playerid,descarga, 0x80FFFFAA);
    GangZoneShowForPlayer(playerid,descargalv, 0x80FFFFAA);
    //variavel
    gmod[playerid] = 0;
    noevento[playerid] = 0;
    GPS_Spawned[playerid] = 1;
    nogame[playerid] = 0;
    Logarprof(playerid);
    autoescola[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);
    //fim
    if(dini_Isset("WantedLevel .ini",PlayerName(playerid))) SetPlayerWantedLevel (playerid,dini_Int("WantedLevel.ini",PlayerName(playerid)));
    if(pAdmin[playerid] == 0)
    {
        admin[playerid] = 0;
        dini_IntSet(file, "aAdmin", 0);
    }
    if(Morreu[playerid] == true)
    {
       SetPlayerSkin(playerid,SkinDeAntes[playerid]);
       Morreu[playerid] = false;
    }
    if(dini_Int(file, "Procurado") == 1)
    {
        Procurados[playerid]= 1;
    }
    if(dini_Int(file, "Procurado") == 0)
    {
        Procurados[playerid]= 0;
    }
    if(pAdmin[playerid] == 1 )
    {
        admin[playerid] = 1;
    }
    if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6 || pAdmin[playerid] == 7)
    {
        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, verdel, "{FF0000}(INFO) {FFFFFF}Vocк й um jogador VIP, aproveite!");
    }
    if(dini_Int(file, "VIP") == 0)
    {
        vip[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,"novatoLS") == 1)
    {
        new string22[128];
        new ip2[128];
        GetPlayerIp(playerid,ip2,128);
        format(string22, sizeof(string22), "Seu nick:{FFFFFF} %s {00FF00}» {6666FF}Seu ID: {FFFFFF}%d ", aname,playerid);
        SendClientMessage(playerid, Vermelho, string22);
        ShowPlayerDialog(playerid, Regras, DIALOG_STYLE_MSGBOX, "Bem-Vindo", "~> Vocк nascerб em Los Santos\n~> Va ate a Agencai De Empregos e pegue um emprego\n~> Troque skins no simbolo da ''Camisa'' em Los Santos\n~> Nгo comete DM fora da favela pois sera preso\n~> Nгo cometa DM,Nгo xingue,Nгo peзa ADM,Nгo use xiters\n~> CONCORDA?.", "Concordo", "Discordo");
    }
    if(dini_Int(file, "Preso") == 1)
    {
        SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
        SetPlayerInterior(playerid, 6);
        SetPlayerHealth(playerid,99999);
        ResetPlayerWeapons(playerid);
        TogglePlayerControllable(playerid, 1);
        SendClientMessage(playerid, Vermelho, "(INFO) {FFFFFF}Vocк estб preso. Para ser solto, contrate um advogado ou pague a fianзa /fianca");
        preso[playerid] = 1;
        dini_IntSet(file2, "ofmaconha", 0);
        dini_IntSet(file2, "ofcocaina", 0);
        dini_IntSet(file2, "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);
    }
    return 1;
}
Tenta ae!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)