Help Seatbelt
#1

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
Reply
#2

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;
}
Reply
#3

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

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

Quote:

now fixed /wanted,/admins

Quote:

but still on /admins and others commands dont work HELP

So working or no?
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)