PDA

View Full Version : [Help] loop in Dealership


Case Sensitive
10/10/2011, 02:01 AM
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


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

SuperViper
10/10/2011, 12:57 PM
You can't place cars in their positions in OnFilterScriptInit because no players are connected at that time.

Case Sensitive
10/10/2011, 12:59 PM
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.