SA-MP Forums Archive
Question - 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: Question (/showthread.php?tid=353009)



Question - Dan_Barocu - 21.06.2012

How can i make so when player enters car he gets a message owned by: XXX?

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
    {
        if(IsPlayerAdmin(playerid)) { }
        else
        {
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx, cy, cz);
        }
    }
    return 1;
}



Respuesta: Question - Chris1337 - 21.06.2012

whats your (Owner) Enum?


Re: Question - Revo - 21.06.2012

Not sure about your question since its lacking detail.. but
pawn Код:
if(IsPlayerAdmin(playerid)) { }
        else
        {
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx, cy, cz);
        }
Why are you not using if(!IsPlayerAdmin(playerid)){}?


Re: Question - tyler12 - 21.06.2012

pawn Код:
new string[56]
format(string,sizeof(string),"Vehicle owner: %s",CarInfo[vehicleid][cOwner]); //Replace with your enum..
SendClientMessage(playerid,-1,string);



Re: Question - Dan_Barocu - 21.06.2012

Quote:
Originally Posted by tyler12
Посмотреть сообщение
pawn Код:
new string[56]
format(string,sizeof(string),"Vehicle owner: %s",CarInfo[vehicleid][cOwner]); //Replace with your enum..
SendClientMessage(playerid,-1,string);
then each car gets Vehicle owner: i want only owned cars..can you help me so that all cars that are owned in this notepad to get vehicle (masini.cfg)= notepad)

PHP код:
if(idx == carsonserver)
        {
            
file2 fopen("masini.cfg"io_write);
        }
        else
        {
            
file2 fopen("masini.cfg"io_append);
        } 



Re: Question - Dan_Barocu - 21.06.2012

can anyone help?sorry for bump i dont know what bump is..


Re: Question - Dan_Barocu - 22.06.2012

is this one good??

pawn Код:
new string[56];
    if(PlayerInfo[playerid][pPcarkey] != -1) && (PlayerInfo[playerid][pPcarkey2] != -1) && (PlayerInfo[playerid][pPcarkey3] != -1)
    {
        format(string,sizeof(string),"Vehicul inregistrat pe numele: %s",CarInfo[vehicleid][cOwner]);
        SendClientMessage(playerid, COLOR_BLUE, string);
    }