10.05.2011, 08:28
(
Последний раз редактировалось Ruto; 10.05.2011 в 09:03.
)
Hi!!
I have a problem with my FS.
I will make a FS where the recording restart when I type /r
We can't use StopRecordingPlayback and StartRecordingPlayback in a FS (if you succeed this, thanks to say me how you do).
This is why, I'm require to Kick NPC and ConnectNPC for restart his recording.
This is a little part of my FS:
When I type /r, the npc won't connect to the server or will connect but won't enter in his vehicle.
Thank you in advance !!
Sorry for my bad english.
I have a problem with my FS.
I will make a FS where the recording restart when I type /r
We can't use StopRecordingPlayback and StartRecordingPlayback in a FS (if you succeed this, thanks to say me how you do).
This is why, I'm require to Kick NPC and ConnectNPC for restart his recording.
This is a little part of my FS:
Код:
#include <a_samp>
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
PutPlayerInVehicle(playerid, Veh, 0); //The NPC enter in his vehicle
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/r", cmdtext, true) == 0)
{
if(npc[playerid] != -1) Kick(npc[playerid]); //If the NPC already connected = Kick
new name[16], name2[20];
GetPlayerName(playerid, name, sizeof(name));
format(name2, sizeof(name2), "NPC_%s", name);
new id=0;
while(IsPlayerConected(id)) id++
npc[playerid] = id; //This is the new NPC's id
ConnectNPC(name2, "npc");
return 1;
}
return 0;
}
Thank you in advance !!
Sorry for my bad english.

