SA-MP Forums Archive
Help Seatbelt - 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 Seatbelt (/showthread.php?tid=286779)



Help Seatbelt - wumpyc - 30.09.2011

hey i made that

PHP Code:
#include <a_samp>
#include <a_players>
#define FILTERSCRIPT
    #if defined FILTERSCRIPT
    #endif
public OnFilterScriptInit()
{
    
SendClientMessageToAll(0xFFFF00FF,"Seatbelt loaded!");
    
SetTimer("message"40000true);
    print(
"\n--------------------------------------");
    print(
" SeatBelt system running!");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    
SendClientMessageToAll(0xFFFF00FF,"Seatbelt unloaded!");
    return 
1;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    
SendClientMessage(playerid0x00FF00FF,"Click /seatbelt or you will get wanted!");
    return 
1;
}
forward message();
public 
message()
{
    
    for(new 
playeridplayerid != MAX_PLAYERS; ++playerid)
    {
        if (!
IsPlayerConnected(playerid))continue;
        if(
IsPlayerInAnyVehicle(playerid))
        {
            new 
wantedlevel GetPlayerWantedLevel(playerid);
            
SetPlayerWantedLevel(playerid,wantedlevel 2);
            
SendClientMessage(playerid,0xFF0000FF,"You didnt used seatbelt!");
            
SendClientMessage(playerid,0xFF0000FF,"You are wanted!");
            
PlayCrimeReportForPlayer (playeridplayerid16);
        }
    }
    return 
1;
}
public 
OnPlayerCommandText (playeridcmdtext [])
{
    if( !
strcmp(cmdtext"/seatbelt"))
    if(
IsPlayerInAnyVehicle(playerid))
    
SendClientMessage(playerid0x00FF00FF,"Thank you for using seatbelt!");
    return 
1;
        
    } 
Im using PPC_Trucking...why if i use that fs the other commands arent working??


HELP



Re: Help Seatbelt - Raimis_R - 30.09.2011

pawn Code:
#include <a_samp>

#define FILTERSCRIPT


public OnFilterScriptInit()
{
    SendClientMessageToAll(0xFFFF00FF,"Seatbelt loaded!");
    SetTimer("message", 40000, true);
    print("\n--------------------------------------");
    print(" SeatBelt system running!");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    SendClientMessageToAll(0xFFFF00FF,"Seatbelt unloaded!");
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid, 0x00FF00FF,"Click /seatbelt or you will get wanted!");
    return 1;
}

forward message();
public message()
{

    for(new playerid; playerid != MAX_PLAYERS; ++playerid)
    {
        if (!IsPlayerConnected(playerid))continue;

        if(IsPlayerInAnyVehicle(playerid))
        {
            new wantedlevel = GetPlayerWantedLevel(playerid);
            SetPlayerWantedLevel(playerid,wantedlevel + 2);
            SendClientMessage(playerid,0xFF0000FF,"You didnt used seatbelt!");
            SendClientMessage(playerid,0xFF0000FF,"You are wanted!");
            PlayCrimeReportForPlayer (playerid, playerid, 16);
        }
    }
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext [])
{
    if( !strcmp(cmdtext, "/seatbelt", true))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, 0x00FF00FF,"Thank you for using seatbelt!");
        }
        return 1;
    }
    return 1;
}



Re: Help Seatbelt - wumpyc - 30.09.2011

now fixed /wanted,/admins... so i dont get thanks for using setbelt but still on /admins and others commands dont work HELP


Re: Help Seatbelt - DRIFT_HUNTER - 30.09.2011

Try to remove
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#endif


Re: Help Seatbelt - Raimis_R - 30.09.2011

Quote:

now fixed /wanted,/admins

Quote:

but still on /admins and others commands dont work HELP

So working or no?


Re: Help Seatbelt - wumpyc - 30.09.2011

drift i like your pic xDD....i found souliton...i placed whole to GM tnx ramis