1
Scripting SA-MP [Pawn center] / Re : Taxi manager
« le: 17 Décembre 2008, 15:21:41 »
à mon avis, c'est de ce lien dont il parlait, et il est bien dead
Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.
le patch est enfin sortit.. (32mo)
je n'aurais jamais du l'installer :wall
je ne peux plus jouer si ma manette PS2 est connecté au pc, sinon niko regarde le ciel..
je suis allé faire un tour sur le forum officiel, ça me rassure je suis pas le seul à avoir ce problème !
j'ai quand même lancé un benchmark par curiosité, aucune différence...
new varfollow[MAX_PLAYERS] = 0;
forward FollowMe( playerid, actorid );
if(strcmp( cmd, "/go", true ) == 0)
{
varfollow[playerid] = 1;
SetTimer("FollowMe", 1000, 1);
return 1;
}
if(strcmp( cmd, "/go-off", true ) == 0)
{
varfollow[playerid] = 0;
return 1;
}
public FollowMe(playerid, actorid)
{
if (varfollow[playerid] == 1)
{
new vehicleid;
new x=1;
new Float:fX,Float:fY,Float:fZ;
GetPlayerPos(playerid, fX, fY, fZ);
while(x!=20)
{
vehicleid = GetActorVehicleID(x);
if(vehicleid != INVALID_VEHICLE_ID)
{
ActorDriveVehicleTo(x,vehicleid,fX, fY, fZ,20.0,2);
}
x++;
}
}
return 1;
}
RaceParticipant[playerid]=3;
ReadyRefresh();
if(Racemode == 3)
{
SetRaceCheckpoint(playerid,LCurrentCheckpoint,LCurrentCheckpoint-1);
CurrentCheckpoint[playerid]=LCurrentCheckpoint;
}
else SetRaceCheckpoint(playerid,0,1);
RaceParticipant[playerid]=1;
CurrentLap[playerid]=0;
SendClientMessage(playerid, COLOR_GREEN, "You have joined the race, go to the start!");
Participants++;
new PState=GetPlayerState(playerid);
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Choose a car and type /join to join the race!");
return 1;
}
if(PState != PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOR_RED, "Choose a car and type /join to join the race!");
return 1;
}
if(Racemode == 3)
{
SetRaceCheckpoint(playerid,LCurrentCheckpoint,LCurrentCheckpoint-1);
CurrentCheckpoint[playerid]=LCurrentCheckpoint;
}
else SetRaceCheckpoint(playerid,0,1);
RaceParticipant[playerid]=1;
CurrentLap[playerid]=0;
//SendClientMessage(playerid, COLOR_GREEN, "You have joined the race, go to the start!");
Participants++;
format(string, sizeof(string), "<%s> Join the race", name);
SendClientMessageToAll(COLOR_YELLOW, string);
new target;
SetVehiclePos(GetPlayerVehicleID(playerid), RaceCheckpoints[target][0],RaceCheckpoints[target][1],RaceCheckpoints[target][2]); // téléporte le véhicule avec le joueur
Participent++;
SetPlayerPos(playerid,RaceCheckpoints[0][0]+ Participent,RaceCheckpoints[0][1]+ Participent,RaceCheckpoints[0][2]+ Participent);
(commande à modifier pour se téléporter directement avec son véhicule, mais j'imagine que tu sais le faire)