[FilterScript] Insure Vehicle v1.0!
#1

Hello sa-mp.com users!
I created a script for vehicle insurance
Script is a very simple
Lies in the fact that:

the player destroying the vehicle receives a given amount of money from the insurance


Код:
Commands:

/insurveh - You Insure vehicle
/cancelinsur - You cancel insure vehicle
Download:


Include > http://www.sendspace.com/file/ept48s
Pastebin script > http://pastebin.com/50abVd2Q
sendspace > amx > http://www.sendspace.com/file/09r0hx
sendspace > pwn> http://www.sendspace.com/file/tj582y

version zcmd soon


Cool script!
Reply
#2

Looks nice, gonna test it later !
Reply
#3

This is terribly scripted and why are you checking if the player has insured a vehicle? Why not check if a vehicle is insured? EG:

pawn Код:
#include <a_samp>
#include <zcmd>

new isInsured[MAX_VEHICLES];

public OnVehicleSpawn(vehicleid)
{
    isInsured[vehicleid] = 0;
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    if(isInsured[vehicleid] == 0)
    {
        DestroyVehicle(vehicleid);
        SendClientMessage(playerid, -1, "Your vehicle was destroyed as it wasn't insured.");
    }
    else
    {
        SetVehicleToRespawn(vehicleid);
        SendClientMessage(playerid, -1, "Your vehicle respawned as it was insured.");
    }
    return 1;
}

command(insureveh, playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(isInsured[GetPlayerVehicleID(playerid)] == 0)
        {
            isInsured[GetPlayerVehicleID(playerid)] = 1;
        }
    }
    return 1;
}
That's basically it.
Reply
#4

+REP Nice work,
But! iGetty is right!
Reply
#5

Good! But i would like to take iGetty command
Reply
#6

Lol, thanks you two xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)