Jump to content

Question

Posted

Problema intalnita (descriere):Am incercat sa fac comanda /paint sa nu o poti folosi daca nu ai licenta gun,dar chiar daca am chiar daca nu am licenta tot merge sa intru in pain
Ero(area / rile) / warning-(ul / urile): La compilare nu imi da nici o eroare
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:paint(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 7.5, 1154.7313,-1440.0776,15.7969))
	{
		if(PaintballRound == 0)
		{
                        if(playerVariables[playerid][pGunLic] != 0) return SCM(playerid,COLOR_WHITE,"Nu ai licenta de arme.");
			if(playerVariables[playerid][pWarrants] != 0) return SCM(playerid,COLOR_WHITE,"You can not enter, because you have wanted.");
			PaintballPlayers ++;
		 	PlayerPaintballing[playerid] = 1;
		  	new rand = random(sizeof(PaintballSpawns));
			SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
			SetPlayerSkin(playerid, 250);
			TogglePlayerControllable(playerid, 0);
			SetPlayerInterior(playerid, 10);
			SetPlayerArmour(playerid,0);
			SetPlayerHealth(playerid,99);
			KillP[playerid] = 0;
			DeathP[playerid] = 0;
			if(PaintballPlayers >= 1 && PaintballRound != 1 && StartingPaintballRound != 1)
			{
				StartingPaintballRound = 1;
				SetTimer("PreparePaintball", 10000, false);
				printf("[PAINTBALL]: Paintball start at command /paint.");
			}
		}
		else
		{
			 format(szMessage, 256, "Poti intra la paintball peste %s minute.", CalculeazaTimp(painttime));
			 SCM(playerid,COLOR_DBLUE, szMessage);
		}
	}
	return 1;
}

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:Da

4 answers to this question

Recommended Posts

  • 0
Posted

Am mutat verificarile la inceputul comenzii. Apropo, pGunLic este 1 cand are si 0 cand nu are ?

Aici e codul.

 

CMD:paint(playerid, params[])
{
	if(playerVariables[playerid][pGunLic] != 0) return SCM(playerid,COLOR_WHITE,"Nu ai licenta de arme.");
	if(playerVariables[playerid][pWarrants] != 0) return SCM(playerid,COLOR_WHITE,"You can not enter, because you have wanted.");
    if(IsPlayerInRangeOfPoint(playerid, 7.5, 1154.7313,-1440.0776,15.7969))
	{
		if(PaintballRound == 0)
		{
			PaintballPlayers ++;
		 	PlayerPaintballing[playerid] = 1;
		  	new rand = random(sizeof(PaintballSpawns));
			SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
			SetPlayerSkin(playerid, 250);
			TogglePlayerControllable(playerid, 0);
			SetPlayerInterior(playerid, 10);
			SetPlayerArmour(playerid,0);
			SetPlayerHealth(playerid,99);
			KillP[playerid] = 0;
			DeathP[playerid] = 0;
			if(PaintballPlayers >= 1 && PaintballRound != 1 && StartingPaintballRound != 1)
			{
				StartingPaintballRound = 1;
				SetTimer("PreparePaintball", 10000, false);
				printf("[PAINTBALL]: Paintball start at command /paint.");
			}
		}
		else
		{
			 format(szMessage, 256, "Poti intra la paintball peste %s minute.", CalculeazaTimp(painttime));
			 SCM(playerid,COLOR_DBLUE, szMessage);
		}
	}
	return 1;
}

 

  • 0
Posted

Am mutat verificarile la inceputul comenzii. Apropo, pGunLic este 1 cand are si 0 cand nu are ?

Aici e codul.

 

CMD:paint(playerid, params[])
{
	if(playerVariables[playerid][pGunLic] != 0) return SCM(playerid,COLOR_WHITE,"Nu ai licenta de arme.");
	if(playerVariables[playerid][pWarrants] != 0) return SCM(playerid,COLOR_WHITE,"You can not enter, because you have wanted.");
    if(IsPlayerInRangeOfPoint(playerid, 7.5, 1154.7313,-1440.0776,15.7969))
	{
		if(PaintballRound == 0)
		{
			PaintballPlayers ++;
		 	PlayerPaintballing[playerid] = 1;
		  	new rand = random(sizeof(PaintballSpawns));
			SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
			SetPlayerSkin(playerid, 250);
			TogglePlayerControllable(playerid, 0);
			SetPlayerInterior(playerid, 10);
			SetPlayerArmour(playerid,0);
			SetPlayerHealth(playerid,99);
			KillP[playerid] = 0;
			DeathP[playerid] = 0;
			if(PaintballPlayers >= 1 && PaintballRound != 1 && StartingPaintballRound != 1)
			{
				StartingPaintballRound = 1;
				SetTimer("PreparePaintball", 10000, false);
				printf("[PAINTBALL]: Paintball start at command /paint.");
			}
		}
		else
		{
			 format(szMessage, 256, "Poti intra la paintball peste %s minute.", CalculeazaTimp(painttime));
			 SCM(playerid,COLOR_DBLUE, szMessage);
		}
	}
	return 1;
}

 

Tot nu merge

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.