SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 09/07/2018, 12:41 AM   #11
JoelNyiTz
Big Clucker
 
JoelNyiTz's Avatar
 
Join Date: Apr 2018
Location: OakVille
Posts: 93
Reputation: 0
Default Re: Swat

Quote:
Originally Posted by JoelNyiTz View Post
Resolvido esse problema!

Code:
if(!PlayerToPoint(2.0, playerid, 253.2745,77.1979,1003.6406)) return SendClientMessage(playerid, COLOR_WHITE, "Você não está no local adequado");
Estou tendo mais um problema, quando morro a skin não está salvando, alguém consegue me ajudar?

Update! <3
JoelNyiTz is offline   Reply With Quote
Old 09/07/2018, 01:55 AM   #12
IlanZ
High-roller
 
IlanZ's Avatar
 
Join Date: Jul 2016
Location: Brasil
Posts: 1,381
Reputation: 75
Default Re: Swat

Mostre o código.
IlanZ is offline   Reply With Quote
Old 09/07/2018, 03:42 PM   #13
JoelNyiTz
Big Clucker
 
JoelNyiTz's Avatar
 
Join Date: Apr 2018
Location: OakVille
Posts: 93
Reputation: 0
Default Re: Swat

Quote:
Originally Posted by IlanZ View Post
Mostre o código.
Aqui está.

Code:
		if(strcmp(texto,	"swat",	true) == 0)
		{
			if(PlayerInfo[playerid][pSwat] == 1)
			{
			    if(PlayerDeath[playerid][jRopa] == 1
                if(!PlayerToPoint(2.0, playerid, 253.2745,77.1979,1003.6406)) return SendClientMessage(playerid, COLOR_WHITE, "Você não está no local adequado");
                if(PlayerInfo[playerid][pDuty] == 0)
				{
    				PlayerInfo[playerid][pDuty] = 1;
					SendClientMessage(playerid, COLOR_WHITE, "Você colocou seu uniforme de SWAT.");
					RemovePlayerAttachedObject(playerid, 3);
 					RemovePlayerAttachedObject(playerid, 4);
					SetPlayerSkin(playerid, 285);
					SetPlayerColor(playerid,COLOR_POLICIA);
				}
				else
				{
    				RemovePlayerAttachedObject(playerid, 3);
					RemovePlayerAttachedObject(playerid, 4);
					SetPlayerColor(playerid,COLOR_WHITE);
					SendClientMessage(playerid, COLOR_WHITE, "Você retirou seu uniforme de SWAT.");
					SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);
					PlayerInfo[playerid][pDuty] = 0;
					if(PlayerInfo[playerid][pWP1] == 3)
				{
					QuitarArma(playerid, 3);
					QuitarArma(playerid, 3);
					QuitarArma(playerid, 24);
					QuitarArma(playerid, 27);
					QuitarArma(playerid, 31);
					RemovePlayerAttachedObject(playerid,1);
					QuitarArma(playerid, 46);
					QuitarArma(playerid, 41);
					QuitarArma(playerid, 16);
				}
					ResetPlayerWeapons(playerid);
					DarArmas(playerid);
				}
			}
			else return SendClientMessage(playerid,-1,"Você não está na divisão da SWAT.");
		}
		return 1;
	}
JoelNyiTz is offline   Reply With Quote
Old 09/07/2018, 07:55 PM   #14
Koplan
Big Clucker
 
Koplan's Avatar
 
Join Date: Aug 2016
Location: Portugal
Posts: 84
Reputation: 27
Default Re: Swat

Procure por
Code:
stock ApareceHospital(playerid)
e mande o código.
Koplan is offline   Reply With Quote
Old 09/07/2018, 08:08 PM   #15
JoelNyiTz
Big Clucker
 
JoelNyiTz's Avatar
 
Join Date: Apr 2018
Location: OakVille
Posts: 93
Reputation: 0
Default Re: Swat

Quote:
Originally Posted by Koplan View Post
Procure por
Code:
stock ApareceHospital(playerid)
e mande o código.

Aqui está
Code:
stock ApareceHospital(playerid)
{
	EstablecerVida(playerid,4.0);
	if(PlayerInfo[playerid][pDuty] != 1)
	{
		QuitarArmas(playerid);
	}
	DarRopa(playerid);
	DarArmas(playerid);
	DarPrendas(playerid);
	HospitalMasCercano(playerid);
	SetPlayerInterior(playerid,0);
	SetPlayerVirtualWorld(playerid, 0);
	PlayerInfo[playerid][Agonizando] = 0;
	Muriendo[playerid] = 0;
	TogglePlayerControllable(playerid,0);
	SetPVarInt(playerid, "IsFrozen", 0);
	SendClientMessage(playerid, COLOR_WHITE,"{FFBC00}Você foi levado até ao hospital e os médicos puderam reanimar você.");
	SendClientMessage(playerid, COLOR_WHITE,"{FFBC00}Estão curando suas feridas, aguarde um momento.");
	SetTimerEx("CurarON",2000,false,"d",playerid);
	return 1;
}
JoelNyiTz is offline   Reply With Quote
Old 09/07/2018, 08:15 PM   #16
Koplan
Big Clucker
 
Koplan's Avatar
 
Join Date: Aug 2016
Location: Portugal
Posts: 84
Reputation: 27
Default Re: Swat

Tente isto, se aparecer algum erro poste-o para eu resolver.

PHP Code:
if(strcmp(texto,    "swat",    true) == 0)
        {
            if(
PlayerInfo[playerid][pSwat] == 1)
            {
                if(!
PlayerToPoint(2.0playerid253.2745,77.1979,1003.6406)) return SendClientMessage(playeridCOLOR_WHITE"Você não está no local adequado");
                if(
PlayerInfo[playerid][pDuty] == 0)
                {
                            
PlayerInfo[playerid][pDuty] = 1;
                    
SendClientMessage(playeridCOLOR_WHITE"Você colocou seu uniforme de SWAT.");
                    
RemovePlayerAttachedObject(playerid3);
                     
RemovePlayerAttachedObject(playerid4);
                                        
PlayerInfo[playerid][pModelo] = 285;
                    
SetPlayerSkin(playeridPlayerInfo[playerid][pModelo]);
                    
SetPlayerColor(playerid,COLOR_POLICIA);
                }
                else
                {
                    
RemovePlayerAttachedObject(playerid3);
                    
RemovePlayerAttachedObject(playerid4);
                    
SetPlayerColor(playerid,COLOR_WHITE);
                    
SendClientMessage(playeridCOLOR_WHITE"Você retirou seu uniforme de SWAT.");
                    
SetPlayerSkin(playeridPlayerInfo[playerid][jRopa]);
                    
PlayerInfo[playerid][pDuty] = 0;
                    if(
PlayerInfo[playerid][pWP1] == 3)
                {
                    
QuitarArma(playerid3);
                    
QuitarArma(playerid3);
                    
QuitarArma(playerid24);
                    
QuitarArma(playerid27);
                    
QuitarArma(playerid31);
                    
RemovePlayerAttachedObject(playerid,1);
                    
QuitarArma(playerid46);
                    
QuitarArma(playerid41);
                    
QuitarArma(playerid16);
                }
                    
ResetPlayerWeapons(playerid);
                    
DarArmas(playerid);
                }
            }
            else return 
SendClientMessage(playerid,-1,"Você não está na divisão da SWAT.");
        }
        return 
1;
    } 

Last edited by Koplan; 09/07/2018 at 09:33 PM.
Koplan is offline   Reply With Quote
Old 09/07/2018, 08:51 PM   #17
JoelNyiTz
Big Clucker
 
JoelNyiTz's Avatar
 
Join Date: Apr 2018
Location: OakVille
Posts: 93
Reputation: 0
Default Re: Swat

Quote:
Originally Posted by Koplan View Post
Tente isto, se aparecer algum erro poste-o para eu resolver.

PHP Code:
if(strcmp(texto,    "swat",    true) == 0)
        {
            if(
PlayerInfo[playerid][pSwat] == 1)
            {
                if(
PlayerDeath[playerid][jRopa] == 1
                
if(!PlayerToPoint(2.0playerid253.2745,77.1979,1003.6406)) return SendClientMessage(playeridCOLOR_WHITE"Você não está no local adequado");
                if(
PlayerInfo[playerid][pDuty] == 0)
                {
                            
PlayerInfo[playerid][pDuty] = 1;
                    
SendClientMessage(playeridCOLOR_WHITE"Você colocou seu uniforme de SWAT.");
                    
RemovePlayerAttachedObject(playerid3);
                     
RemovePlayerAttachedObject(playerid4);
                                        
PlayerInfo[playerid][pModelo] = 285;
                    
SetPlayerSkin(playeridPlayerInfo[playerid][pModelo]);
                    
SetPlayerColor(playerid,COLOR_POLICIA);
                }
                else
                {
                    
RemovePlayerAttachedObject(playerid3);
                    
RemovePlayerAttachedObject(playerid4);
                    
SetPlayerColor(playerid,COLOR_WHITE);
                    
SendClientMessage(playeridCOLOR_WHITE"Você retirou seu uniforme de SWAT.");
                    
SetPlayerSkin(playeridPlayerInfo[playerid][jRopa]);
                    
PlayerInfo[playerid][pDuty] = 0;
                    if(
PlayerInfo[playerid][pWP1] == 3)
                {
                    
QuitarArma(playerid3);
                    
QuitarArma(playerid3);
                    
QuitarArma(playerid24);
                    
QuitarArma(playerid27);
                    
QuitarArma(playerid31);
                    
RemovePlayerAttachedObject(playerid,1);
                    
QuitarArma(playerid46);
                    
QuitarArma(playerid41);
                    
QuitarArma(playerid16);
                }
                    
ResetPlayerWeapons(playerid);
                    
DarArmas(playerid);
                }
            }
            else return 
SendClientMessage(playerid,-1,"Você não está na divisão da SWAT.");
        }
        return 
1;
    } 
Code:
error 017: undefined symbol "PlayerDeath"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
JoelNyiTz is offline   Reply With Quote
Old 09/07/2018, 08:53 PM   #18
NelsonC
Big Clucker
 
NelsonC's Avatar
 
Join Date: Oct 2017
Location: Germany
Posts: 171
Reputation: 11
Default Re: Swat

Quote:
Originally Posted by JoelNyiTz View Post
Code:
error 017: undefined symbol "PlayerDeath"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
PHP Code:
if(PlayerDeath[playerid][jRopa] == 
NelsonC is offline   Reply With Quote
Old 09/07/2018, 08:57 PM   #19
Koplan
Big Clucker
 
Koplan's Avatar
 
Join Date: Aug 2016
Location: Portugal
Posts: 84
Reputation: 27
Default Re: Swat

Quote:
Originally Posted by NelsonC View Post
PHP Code:
if(PlayerDeath[playerid][jRopa] == 
Isso, bem observado. O parentesis fugiu-me.
Mas creio que o código está bem, tente compilar agora Joel.
__________________
[Tutorial] Medidas para evitar ataques DDoS
Koplan is offline   Reply With Quote
Old 09/07/2018, 08:57 PM   #20
JoelNyiTz
Big Clucker
 
JoelNyiTz's Avatar
 
Join Date: Apr 2018
Location: OakVille
Posts: 93
Reputation: 0
Default Re: Swat

Quote:
Originally Posted by NelsonC View Post
PHP Code:
if(PlayerDeath[playerid][jRopa] == 
Mesmo erro nessa linha
JoelNyiTz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SWAT 4? s1k Everything and Nothing 21 08/10/2013 03:02 PM
help on swat nati558866 Help Archive 4 20/02/2010 06:47 PM


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.