SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/04/2015, 11:59 AM   #1
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Actors

Kalcor says:
Quote:
The 0.2.5 actors were not synced. What you are seeing in those videos is essentially just GTA:SA's single player AI. I could go and add everything from single player to SA-MP including all the street peds, but it wouldn't synced, so what's the point?

We never released anything to do with 0.2.5 actors. What you see in those videos was leaked by someone passwording a beta team member on this forum. That stuff was added for testing only and I figured out quickly it would not work well with the way SA-MP was designed. What those videos aren't showing you is that the actors could only drive for around 200 meters around the player.

I added the actor system in 0.3.7 because I could see someone wanting to complete their server scripted casino but they didn't want to set up a whole bunch of NPCs. I had no intention of extending it beyond that for 0.3.7.

SA-MP will probably never have peds that can roam around freely, or drive cars by AI. It has already been attempted many times by different people, including myself. There have been various hacks to do bots/extended NPCs and they haven't been that popular. There has never been a great enough demand from the servers that hold most of SA-MP's players to focus time and resources on AI.
Do actor synchronized for all players is heavy / impossible, I agree.
But can create player-actor.

Something like this:

Code:
//PlayerActor
native CreatePlayerActor(playerid,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,name[]);
native DestroyPlayerActor(playerid,PlayerActorid);
native SpawnPlayerActor(playerid,PlayerActorid);
native PlayerActorMoveTo(playerid,PlayerActorid,movetype,Float:X,Float:Y,Float:Z);
native PlayerActorEnterVehicle(playerid,PlayerActorid,vehicleid,passenger);
native PlayerActorExitVehicle(playerid,PlayerActorid,vehicleid);
native PlayerActorDriveVehicleTo(playerid,PlayerActorid,vehicleid,Float:X,Float:Y,Float:Z,Float:Speed,drivetype,Float:MinAltitude=0.0,Float:MaxAltitude=0.0);

//PlayerActorinfo
native SetPlayerActorPos(playerid,PlayerActorid,Float:x,Float:y,Float:z);
native SetPlayerActorPosFindZ(playerid,PlayerActorid,Float:x,Float:y,Float:z);
native GetPlayerActorPos(playerid,PlayerActorid,&Float:x,&Float:y,&Float:z);
native SetPlayerActorFacingAngle(playerid,PlayerActorid,Float:ang);
native GetPlayerActorFacingAngle(playerid,PlayerActorid,&Float:ang);
native SetPlayerActorInterior(playerid,PlayerActorid,interiorid);
native GetPlayerActorInterior(playerid,PlayerActorid);
native SetPlayerActorHealth(playerid,PlayerActorid,Float:health);
native GetPlayerActorHealth(playerid,PlayerActorid,&Float:health);
native SetPlayerActorArmour(playerid,PlayerActorid,Float:armour);
native GetPlayerActorArmour(playerid,PlayerActorid,&Float:armour);
native SetPlayerActorTeam(playerid,PlayerActorid,teamid);
native GetPlayerActorTeam(playerid,PlayerActorid);
native SetPlayerActorColor(playerid,PlayerActorid,color);
native GetPlayerActorColor(playerid,PlayerActorid);
native SetPlayerActorSkin(playerid,PlayerActorid,skinid);
native GetPlayerActorSkin(playerid,PlayerActorid);
native SetPlayerActorWeapon(playerid,PlayerActorid,weaponid);
native ResetPlayerActorWeapon(playerid,PlayerActorid);
native SetPlayerActorName(playerid,PlayerActorid,constname[]);
native GetPlayerActorState(playerid,PlayerActorid);
native GetPlayerActorWeapon(playerid,PlayerActorid);
native GetPlayerActorKeys(playerid,PlayerActorid,&keys,&updown,&leftright);
native GetPlayerActorName(playerid,PlayerActorid,constname[],len);

//PlayerActorcontrols
native PutPlayerActorInVehicle(playerid,PlayerActorid,vehicleid,seatid);
native GetPlayerActorVehicleID(playerid,PlayerActorid);
native GetPlayerActorVehicleSeat(playerid,PlayerActorid);
native RemovePlayerActorFromVehicle(playerid,PlayerActorid);
native PlayerActorApplyAnimation(playerid,PlayerActorid,animlib[],animname[],Float:fS,opt1,opt2,opt3,opt4,opt5);
native PlayerActorClearAnimations(playerid,PlayerActorid);

//PlayerActorconditionals
native IsPlayerActorConnected(playerid,PlayerActorid);
native IsPlayerActorInVehicle(playerid,PlayerActorid,vehicleid);
native IsPlayerActorInAnyVehicle(playerid,PlayerActorid);

//VirtualWorlds
native SetPlayerActorVirtualWorld(playerid,PlayerActorid,worldid);
native GetPlayerActorVirtualWorld(playerid,PlayerActorid);
This is very useful, even if it was only for one player. It would be good with it to from single-player missions. There is no need to synchronize for all players.
ATomas is offline   Reply With Quote
Old 30/04/2015, 12:07 PM   #2
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 618
Reputation: 46
Default Re: Actors

you have NO idea what you are talking about when you say
Quote:
There is no need to synchronize.
Iknow alot of people want better npc's /actors but this post doesnt help anything.
stop it before the dev team thinks twice about adding better npc's at all.
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634
AIped is offline   Reply With Quote
Old 30/04/2015, 12:12 PM   #3
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Re: Actors

Quote:
Originally Posted by AIped View Post
you have NO idea what you are talking about when you say
Iknow alot of people want better npc's /actors but this post doesnt help anything.
stop it before the dev team thinks twice about adding better npc's at all.
Kalcor not do better actor. That is the reason why I wrote this. Half a loaf is better than no bread.
ATomas is offline   Reply With Quote
Old 30/04/2015, 12:20 PM   #4
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 618
Reputation: 46
Default Re: Actors

Quote:
Half a loaf is better than no bread
LOL well actually
i think its good to have adding actors for the use of shops..diners..strip clubs and so without loosing any player slots. i think that is what these actors are meant for
and npc's are for more A.I. stuff like you were talking about...not that npc's can do much better though.
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634
AIped is offline   Reply With Quote
Old 30/04/2015, 12:29 PM   #5
RaeF
Huge Clucker
 
Join Date: Dec 2014
Location: Indonesia
Posts: 261
Reputation: 27
Default Re: Actors

Notice: SA-MP 0.3.7 is currently in feature lock-down. This will likely be the final RC testing phase for 0.3.7.
RaeF is offline   Reply With Quote
Old 30/04/2015, 12:30 PM   #6
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Re: Actors

NPC can just play what we record him. Actor has much more potential.
Quote:
Notice: SA-MP 0.3.7 is currently in feature lock-down. This will likely be the final RC testing phase for 0.3.7.
This text is already there from RC5
ATomas is offline   Reply With Quote
Old 30/04/2015, 12:43 PM   #7
Emmet_
Guest
 
Posts: n/a
Default Re: Actors

And how would per-player actors be able to drive a vehicle? Vehicles can not be created per-player, so it would only sync for that specific player.
  Reply With Quote
Old 30/04/2015, 12:55 PM   #8
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Re: Actors

Quote:
Originally Posted by Emmet_ View Post
And how would per-player actors be able to drive a vehicle? Vehicles can not be created per-player, so it would only sync for that specific player.
I forgot it. Add CreateActorVehicle
ATomas is offline   Reply With Quote
Old 30/04/2015, 01:03 PM   #9
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 618
Reputation: 46
Default Re: Actors

Quote:
Originally Posted by ATomas View Post
I forgot it. Add CreateActorVehicle
Like Emmet said..its not possible just forget about it..saves you alot of time trust me.
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634
AIped is offline   Reply With Quote
Old 30/04/2015, 01:38 PM   #10
dominik523
Gangsta
 
dominik523's Avatar
 
Join Date: Feb 2013
Location: Croatia
Posts: 843
Reputation: 115
Default Re: Actors

It looks like you are suggesting everything that NPCs are capable of.
Actors are static models which don't move. They are here to be spawned in stores or somewhere else, not to drive around town or something.
dominik523 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any voice actors? Lucky™ Everything and Nothing 4 22/01/2015 12:02 PM
Removing actors in interior zgintasz Scripting Help 0 22/09/2012 10:57 AM
NPC < Bots vs Actors > RSX General 6 25/09/2010 07:38 PM


All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.