SA-MP Forums Archive
NPC enters a wagon not the locomotive. - 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: NPC enters a wagon not the locomotive. (/showthread.php?tid=446556)



NPC enters a wagon not the locomotive. - kristo - 26.06.2013

The title says everything.

Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid))
	{
	    new nimi[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, nimi, MAX_PLAYER_NAME);
	    if (!strcmp(nimi, "Rongijuht_Toomas", true))
	    {
	        SetPlayerSkin(playerid, 253);
	        for (new i; i < MAX_VEHICLES; i++)
	        {
	            if (GetVehicleModel(i) == 538 && AutoInfo[i][vNPC] != 1)
	            {
	                PutPlayerInVehicle(playerid, i, 0);
	                AutoInfo[i][vNPC] = 1;
	                SetVehicleParamsEx(i, 1, 1, 0, 0, 0, 0, 0);
	            }
	        }
	    }
	    return 1;
	}
        return 1;
 }