[FilterScript] Car Disco.
#1

This system is Change Vehicle Color
Код:
#include <a_samp>
new gDisco[MAX_VEHICLES],gTimer[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    new v = GetPlayerVehicleID(playerid);
    if(strcmp("/Disco", cmdtext, true, 10) == 0)
    {
        gDisco[v] = gDisco[v]? 1:0;
        if(!IsPlayerInAnyVehicle(v))return SendClientMessage(playerid,-1,"u not in vehicle");
        else gDisco[v] = 1;
        Disco(v);
        return 1;
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gDisco[vehicleid] == 1)return SendClientMessage(playerid,0xFFFFFAA,"in this vehicle the disco sys is open");
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(gDisco[vehicleid] == 1)return SendClientMessage(playerid,0xFFFFFAA,"u exit from your vehicle and the disco is open");
    return 1;
}
Disco(vehicleid)
{
    if(gDisco[vehicleid] == 0)return 0;
    else KillTimer(gTimer[playerid]);
     gTimer[playerid] = SetTimerEx("Disco",1000,1,"d",vehicleid);
    ChangeVehicleColor(vehicleid,random(255),random(255));
    return 1;
}
Reply


Messages In This Thread
Car Disco. - by ofekw2 - 16.05.2013, 23:50
Re: Car Disco. - by aznpro12345 - 16.05.2013, 23:54
Re: Car Disco. - by ofekw2 - 16.05.2013, 23:56
Re: Car Disco. - by zDivine - 17.05.2013, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)