SA-MP Forums Archive
[Help] loop in Dealership - 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: [Help] loop in Dealership (/showthread.php?tid=289088)



[Help] loop in Dealership - Case Sensitive - 10.10.2011

Hi,
I was creating a system of car dealership, and wanted filterscript was started when the cars were also placed in their positions.

Here is the code in OnPlayerConnect, most wanted to transfer it to OnFilterScriptInit

pawn Код:
public OnPlayerConnect(playerid) // here the public onplayerconnect.
{
    if(pInfo[playerid][iModel1] != 0)
    {
        pInfo[playerid][Carro1] = CreateVehicle(pInfo[playerid][iModelo1], pInfo[playerid][carro1x], pInfo[playerid][carro1y], pInfo[playerid][carro1z], pInfo[playerid][Angulo1], pInfo[playerid][Cor1Car1], pInfo[playerid][Cor2Car1], 9999999999);
    }
    if(pInfo[playerid][iModelo2] != 0)
    {
        pInfo[playerid][Carro2] = CreateVehicle(pInfo[playerid][iModelo2], pInfo[playerid][carro2x], pInfo[playerid][carro2y], pInfo[playerid][carro2z], pInfo[playerid][Angulo2],  pInfo[playerid][Cor1Car2], pInfo[playerid][Cor2Car2], 9999999999);
    }
    return 1;
}
Ps.: I use dini


Re: [Help] loop in Dealership - SuperViper - 10.10.2011

You can't place cars in their positions in OnFilterScriptInit because no players are connected at that time.


Re: [Help] loop in Dealership - Case Sensitive - 10.10.2011

I do not want to add players when logarem, but rather want filterscript load when the server starts, or upload all files in the folder Concessionaria.