SA-MP Forums Archive
[FilterScript] Private Cars! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Private Cars! (/showthread.php?tid=395650)



Private Cars! - Lynet - 27.11.2012

Hello, i take no credits. Credits goes to Sinbad.


PHP код:
/*
ddd
*/
#include <a_samp>
//cars
new lynetcar;
//new carlynet;
//icons
new lynet;
//new car;
//colors
#define red              0xFF0000AA
#define green            0x33FF33AA
#define yellow           0xFFFF00AA
public OnFilterScriptInit()
{
    print(
"************************************");
    print(
"*                                  *");
    print(
"*     -----------------------      *");
    print(
"*     | duuum.b |      *");
    print(
"*     -----------------------      *");
    print(
"*                        *");
    print(
"*                                  *");
    print(
"************************************");
//add cars here
                
lynetcar =  AddStaticVehicle(555,2526.8633,-1110.6735,56.7608,176.4095,60,1); // GDLynC3
                
carlynet =  AddStaticVehicle(581,2521.9036,-1119.0293,55.4208,258.0922,58,1); // GDLynC1
    
return 1;
}
public 
OnPlayerStateChange(playerid,newstateoldstate)
{
        new 
vehicleid GetPlayerVehicleID(playerid);
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,pname,sizeof pname);
        if (
newstate == PLAYER_STATE_DRIVER)
        {
                if (
vehicleid == lynetcar)
                {
                 if(
strcmp(pname,"[GD]Lynet",true) ==0)
                 {
                        {
                        
SendClientMessage(playerid,red,"Server Message: Hello , welcome back.");
                        }
                    return 
1;
                 }
                 else
                 {
                        
RemovePlayerFromVehicle(playerid);
                        
SendClientMessage(playerid,red,"Server Message: Ay, fuck away from Lynets car!");
                        
SendClientMessage(playerid,red,"Server Message: If you wan't a car like this, or other one locked, donate to server.");
                 }
                }
        }
        return 
1;
}
//info icons
public OnGameModeInit()
{
    
lynet CreatePickup(123912167.88351028.990510.9766, -1);
    return 
1;
}
//End of icons
//what the icons say
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == lynetSendClientMessage(playerid,yellow,"This PRIVATE vehicle belongs to player '[COD]Compton'");
    return 
1;




Re: Private Cars! - Krunsy - 27.11.2012

If i looked good at this, this is one car that you can set the name of the owner/s and nobody cant enter?


Re: Private Cars! - Alcatraz Gaming - 27.11.2012

Even if you gave credits, this FS is useless, infact.

The private car only goes for one person. Also, you said
Quote:

This PRIVATE vehicle belongs to player '[COD]Compton'

So, it only comes for this COD guy, but if others donate, and they ask for this feature, what will you do?

That's why, don't copy off other's FSes even if you give credits. You can atleast edit more in it and give credits to the original author


Re: Private Cars! - zProfessional - 27.11.2012

Well this can be still edit
Код:
public OnPlayerPickUpPickup(playerid, pickupid) 
{ 
    if(pickupid == lynet) SendClientMessage(playerid,yellow,"This PRIVATE vehicle belongs to player '%s'"pname); 
    return 1; 
}