SA-MP Forums Archive
[Ajuda]Cinto - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda]Cinto (/showthread.php?tid=224494)



[Ajuda]Cinto - [Dk]TuReTOo - 11.02.2011

boas coloquei o sistema de cinto mas dame estes erros a compilar, podem me ajudar ? ja tentei procurar soluзoes na parte inglesa ma nao encontrei

Код:
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(151) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(151) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(154) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(161) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(164) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(164) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(164) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(170) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(170) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(170) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(174) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(183) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(183) : error 004: function "OnPlayerUpdate" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(205) : error 030: compound statement not closed at the end of file (started at line 109)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
agradeзo.


Re: [Ajuda]Cinto - Baddark2131 - 11.02.2011

Linha ? --'


Re: [Ajuda]Cinto - [Ips]Guh - 11.02.2011

Afff cara...se quiser ajuda posta a linha 151 ate a linha 205.


Re: [Ajuda]Cinto - Swat007forever - 11.02.2011

Mostra as linhas...


Re: [Ajuda]Cinto - [Dk]TuReTOo - 11.02.2011

Код:
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			printf("%s", string);
		}
		return 1; }
        if (strcmp("/ajudacinto", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid,COLOR_GREEN,"*** Para vocк colocar/tirar o cinto de seguranзa , Use /cinto. ***");
    SendClientMessage(playerid,COLOR_GREEN,"*** Nгo pule do veiculo com cinto de seguranзa ou poderб MORRER ENFORCADO! ***");
    SendClientMessage(playerid,COLOR_GREEN,"*** Evite andar sem cinto de seguranзa. Valorize a sua vida ! ***");
    }
      return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid, COLOR_GREEN, "Para a sua seguranзa , ultilize o cinto de seguranca.");
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid){
if(cinto[playerid] == 1){
SendClientMessage(playerid, COLOR_RED, "Vocк pulou do carro com cinto de seguranзa");
GameTextForPlayer(playerid, " ~r~Voce se enforcou com o cinto!", 5000, 3)
SetPlayerHealth(playerid,0);
GivePlayerMoney(playerid,-5000);
}
return 1;
}

//	if (IsPlayerInAnyVehicle(playerid) == 1 && cinto[playerid] == 1)
//   cinto[playerid] = 0;

public OnPlayerUpdate(playerid)
{
	if(IsPlayerInAnyVehicle(playerid) == 1 && cinto[playerid] == 0)
	{
		new Float:TempCarHealth;
		GetVehicleHealth(GetPlayerVehicleID(playerid), TempCarHealth);
		new Float:Difference = floatsub(CarHealth[playerid], TempCarHealth);
		if((floatcmp(CarHealth[playerid], TempCarHealth) == 1) && (floatcmp(Difference,100.0) == 1))
		{
		    Difference = floatdiv(Difference, 10.0);
		    new Float:OldHealth;
		    GetPlayerHealth(playerid, OldHealth);
		    SetPlayerHealth(playerid, floatsub(OldHealth, Difference));
		}
		CarHealth[playerid] = TempCarHealth;
	}
	else
	{
		CarHealth[playerid] = 0.0;
	}
    return 1;
}



Re: [Ajuda]Cinto - Macintosh - 11.02.2011

pawn Код:
forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitVehicle(playerid, vehicleid);
forward OnPlayerUpdate(playerid);
Pow tambйm aponta as linhas dos erros nй? nгo sou algum CDF pra saber


Re: [Ajuda]Cinto - Baddark2131 - 11.02.2011

Quote:
Originally Posted by Lucas Nicolas
Посмотреть сообщение
pawn Код:
forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitVehicle(playerid, vehicleid);
forward OnPlayerUpdate(playerid);
Pow tambйm aponta as linhas dos erros nй? nгo sou algum CDF pra saber
VOCК FUMA MACONHA ?
EM PUBLIC ORIGINAL DO PAWN NГO SE COLOCA FORWARD CARALHO


Re: [Ajuda]Cinto - Macintosh - 11.02.2011

Quote:
Originally Posted by Baddark2131
Посмотреть сообщение
VOCК FUMA MACONHA ?
EM PUBLIC ORIGINAL DO PAWN NГO SE COLOCA FORWARD CARALHO
Foda-se eu coloquei no OnGameModeInit e funfou pke ai nгo funfa -.-'


Re: [Ajuda]Cinto - [Dk]TuReTOo - 11.02.2011

Код:
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(154) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(154) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(157) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(164) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(167) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(167) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(167) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(173) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(173) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(173) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(177) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(186) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(186) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(186) : error 004: function "OnPlayerUpdate" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\cintoseg.pwn(208) : error 030: compound statement not closed at the end of file (started at line 112)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Erro e warning Linha 154
Код:
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
warning linha 157
Код:
return 1; }
warning linha 164
Код:
return 0;
1 warning e 2 erros linha 167
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
1 warning e 2 erros linha 173
Код:
public OnPlayerExitVehicle(playerid, vehicleid){
erro linha 177
[cote]SetPlayerHealth(playerid,0);[/cote]

1 warning e 2 erros linha 186
[cote]public OnPlayerUpdate(playerid)[/cote]

erro linha 208
[cote]Nem tenho linha 208 :S sу tenho atй a linha 207 loooool[/cote]


Re: [Ajuda]Cinto - Macintosh - 11.02.2011

Warning Linha 164
pawn Код:
return 1;
Warning Linha 157
pawn Код:
return 1;
 }
Posta o cуdigo acima de ProxDetector.