[Help] loop in Dealership
#1

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
Reply
#2

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)