[HELP] spam text - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] spam text (
/showthread.php?tid=540362)
[HELP] spam text -
Luca12 - 04.10.2014
Hello. Sometimes when I sit on car I get spammed by text you don't have a driver license? Be careful and watch out for police and it's just spamming and player most exit from server and then enter again. This code is under Onplayerstatechange
pawn Код:
if(!IsAPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && !IsABoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeBiciklo(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
if(PlayerInfo[playerid][DriverLicense] == 0) SendClientMessage(playerid,COLOR_LIGHTRED,"You don't have a driver license? Be careful and watch out for police!");
Speedo(playerid,1);
new string[128];
format(string,sizeof string,"%.1fl",Fuel[GetPlayerVehicleID(playerid)]);
TextDrawSetString(Speedometar0[playerid],string);
}
Re: [HELP] spam text -
Dangjai - 04.10.2014
pawn Код:
if(!IsAPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && !IsABoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeBiciklo(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
if(PlayerInfo[playerid][DriverLicense] == 1) SendClientMessage(playerid,COLOR_LIGHTRED,"You don't have a driver license? Be careful and watch out for police!");
Speedo(playerid,1);
new string[128];
format(string,sizeof string,"%.1fl",Fuel[GetPlayerVehicleID(playerid)]);
TextDrawSetString(Speedometar0[playerid],string);
}
Re: [HELP] spam text -
YanLanger - 04.10.2014
First of all
Make something that checks if player has license
So if he has it says idk you choose if he doesn't have it says You don't got bla bla bla.. just return Senclientmessege etc..
Anyways try this not sure..
PHP код:
if(!IsAPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && !IsABoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeBiciklo(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
if(PlayerInfo[playerid][DriverLicense] == 1) SendClientMessage(playerid,COLOR_LIGHTRED,"You don't have a driver license? Be careful and watch out for police!");
Speedo(playerid,1);
new string[128];
format(string,sizeof string,"%.1fl",Fuel[GetPlayerVehicleID(playerid)]);
TextDrawSetString(Speedometar0[playerid],string);
return 1;
}
Re: [HELP] spam text -
IceCube! - 04.10.2014
The problem isn't in the code posted above, despite the two replies you've had, the problem is located before it.
If you want help, please post the full code / function. This should be under OnPlayerEnterVehicle, without a loop. Unless your SAMP is bugged, it would be a problem with you having a loop or having this under OnPlayerUpdate (Like alot of other servers).
Re: [HELP] spam text -
Luca12 - 04.10.2014
This is full code there's nothung more I post everything and the place where it is and it is under onplayerstatechange. That's it. Thanks
Re: [HELP] spam text -
Dangjai - 04.10.2014
You tested my code?