Problem with function and FS - 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: Problem with function and FS (
/showthread.php?tid=308154)
Problem with function and FS -
Artie_Scorpion - 02.01.2012
I edited one function into this:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
{
If they got into a car from being on foot.
if( GetVehicleModel(GetPlayerVehicleID( playerid )) == 428 )
{
if( GetPlayerSkin(playerid) != 27 )
{
If their skin is not 27
Remove them and send message.
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid,0xFF000000, "Noredami vairuoti si transporta turite buti elektriku" ); -1
return 1;
}
else
{
SendClientMessage(playerid, 0xFF000000, "Atsisedote i transporta. Jeigu dirbate, tada dirbkite savo darba");
return 1;
}
}
}
return 1;
}
After that my one Filterscript bugged. I wrote command /apsaugoti 1, same with /nepasaugoti 1 (1 is player id for ex.)
A command text is bugged. I tryed to mark this function with slash: //
It's not helped. If what its a link for this FS:
http://www.mediafire.com/?a48e5jk53hsrq4q
P.S that FS don't have errors and another thing my NPC bot stopped to join into server.
Problem is, my FS and NPC bot stopped to work.
Re: Problem with function and FS -
Artie_Scorpion - 02.01.2012
help me its very important
Re: Problem with function and FS -
silvan - 02.01.2012
for NPC check if there is something preventing it from connecting, such as obligatory login or something, that should be bypassed for NPC's and for Lock command i prefer using the SetVehicleParamsForPlayer under OnVehicleStreamedIn. That should be better.
Re: Problem with function and FS -
Artie_Scorpion - 02.01.2012
Quote:
Originally Posted by silvan
for NPC check if there is something preventing it from connecting, such as obligatory login or something, that should be bypassed for NPC's and for Lock command i prefer using the SetVehicleParamsForPlayer under OnVehicleStreamedIn. That should be better.
|
I fixed. Something with "SERVER CONSOLE" wrong. It got banned from air. But i unbanned.
Re: Problem with function and FS -
Artie_Scorpion - 02.01.2012
Fixed all problems. Omg its only problem NPC?