Aber wir haben da ja vierparameter stehen.
Code
public OnPlayerConnect(playerid)
{
new playername[MAX_PLAYER_NAME];
SetPlayerName(playerid, playername);
if(strcmp(playername, "Jp_Trasch", true) == 0)
{
SetPlayerCheckpoint(playerid, -1526.695557, 2643.044922, 55.496315);
}
else if(strcmp(playername, "Blitz", true) == 0)
{
SetPlayerCheckpoint(playerid, -1476.1445, 2533.7524, 55.9439);
}
return 1;
}
Alles anzeigen
Code
public OnPlayerEnterCheckpoint(playerid)
{
new playername[MAX_PLAYER_NAME];
SetPlayerName(playerid, playername);
if(strcmp(playername, "Jp_Trasch", true) == 0)
{
{
new vehicleid;
if(inside[playerid])
{
SetPlayerCheckpoint(playerid, -1526.695557, 2643.044922, 55.496315, 3.0);
if(IsPlayerInAnyVehicle(playerid))
{
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,-1549.4980,2605.1785,38.2179);
SetVehicleZAngle(vehicleid,18.5032);
LinkVehicleToInterior(vehicleid, 0);
}
else
{
SetPlayerPos(playerid, -1549.4980,2605.1785,38.2179);
SetPlayerFacingAngle(playerid,18.5032);
SetPlayerInterior(playerid, 0);
}
inside[playerid] = 0;
}
else
{
SetPlayerCheckpoint(playerid, -1546.324097, 2606.455078, 38.083424, 3.0);
if(IsPlayerInAnyVehicle(playerid))
{
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,-1534.9086,2642.1494,55.6437);
SetVehicleZAngle(vehicleid,90.1386);
LinkVehicleToInterior(vehicleid, 0);
}
else
{
SetPlayerPos(playerid,-1534.9086,2642.1494,55.6437);
SetPlayerFacingAngle(playerid,90.1386);
SetPlayerInterior(playerid, 0);
}
inside[playerid] = 1;
}
printf("Jp's Garage(%d)", playerid);
return 1;
}
}
else if(strcmp(playername, "Blitz", true) == 0)
{
new vehicleid;
if(inside[playerid])
{
SetPlayerCheckpoint(playerid, -1476.1445,2533.7524,55.9439, 3.0);
if(IsPlayerInAnyVehicle(playerid))
{
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, -1463.552979, 2509.251465, 34.503513);
SetVehicleZAngle(vehicleid,90);
LinkVehicleToInterior(vehicleid, 0);
}
else
{
SetPlayerPos(playerid, -1463.552979, 2509.251465, 34.503513);
SetPlayerFacingAngle(playerid,90);
SetPlayerInterior(playerid, 0);
}
inside[playerid] = 0;
}
else
{
SetPlayerCheckpoint(playerid, -1445.465576, 2499.558838, 34.482838, 3.0);
if(IsPlayerInAnyVehicle(playerid))
{
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, -1485.3308,2533.6006,56.0270);
SetVehicleZAngle(vehicleid, 90.3655);
LinkVehicleToInterior(vehicleid, 0);
}
else
{
SetPlayerPos(playerid, -1485.3308,2533.6006,56.0270);
SetPlayerFacingAngle(playerid, 90.3655);
SetPlayerInterior(playerid, 0);
}
inside[playerid] = 1;
}
printf("Blitz's Garage(%d)", playerid);
return 1;
}
return 1;
}
Alles anzeigen
Das ist von Trasch gemacht worden, ich hab zwei vonm diesen Warnungen weggepracht als ich bei "OnPlayerConnect" das GetPlayerName, in SetPlayername umwandelte, und das bei beiden.
Ob das richtig ist weis ich nicht, aber vlt hat sich da auch Firzen nur vertan
mfg