26.03.2010, 22:06
Hey can anyone tell me how can i do Admin cars or personla skins?
Thanks in advance!
Thanks in advance!
new ACar[3]; // Change 3 with the amount of admin cars you have
public OnGameModeInit()
{
ACar[0] = AddStaticVehicle(...); //Admin Car1
ACar[1] = AddStaticVehicle(...); //Admin Car2
ACar[2] = AddStaticVehicle(...); //Admin Car3
//So on...
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new V; V</*Amount of admin cars*/; V++)
{
if(vehicleid == ACar[V])
{
if(ispassenger == 0)
{
if(/*Admin Variable here, I'll use IsPlayerAdmin as a example*/ !IsPlayerAdmin(playerid))
{
new Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GameTextForPlayer(playerid, "~r~This is a admin only vehicle!", 1000, 3);
}
}
}
}
return 1;
}