public OnGameModeInit() { EnableStuntBonusForAll(0); ShowPlayerMarkers(0); ManualVehicleEngineAndLights(); SetGameModeText("Crime Life RPG"); new ActorOGF; new ActorLSB; new ActorLSV; ActorOGF = CreateActor(28, 2438.7710,-1901.5355,13.5534,322.5977); //Actor OGF ApplyActorAnimation(ActorOGF, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0); ActorLSV = CreateActor(30, 2700.7739,-1106.5424,69.5781,139.4486); // Actor LSV ApplyActorAnimation(ActorLSV, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0); ActorLSB = CreateActor(183, 1974.7064,-1306.3206,20.8374,268.4688); //Actor LSB ApplyActorAnimation(ActorLSB, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0); //OGF Skins AddPlayerClass(105,2512.4141,-1672.3031,13.4929,88.7945,0,0,0,0,0,0); AddPlayerClass(106,2512.4141,-1672.3031,13.4929,88.7945,0,0,0,0,0,0); AddPlayerClass(107,2512.4141,-1672.3031,13.4929,88.7945,0,0,0,0,0,0); //Balla Skins AddPlayerClass(102,2172.0588,-1677.4969,15.0859,317.7590,0,0,0,0,0,0); AddPlayerClass(103,2172.0588,-1677.4969,15.0859,317.7590,0,0,0,0,0,0); AddPlayerClass(104,2172.0588,-1677.4969,15.0859,317.7590,0,0,0,0,0,0); //Vago Skins AddPlayerClass(108,2704.3115,-1276.2922,57.8825,314.3106,0,0,0,0,0,0); AddPlayerClass(109,2704.3115,-1276.2922,57.8825,314.3106,0,0,0,0,0,0); AddPlayerClass(110,2704.3115,-1276.2922,57.8825,314.3106,0,0,0,0,0,0); //Civilian Skins AddPlayerClass(47,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(48,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(46,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(28,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(25,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(21,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(23,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(29,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); AddPlayerClass(101,2230.6743,-1177.9518,25.7266,43.1502,0,0,0,0,0,0); //Police & Cadet Skins AddPlayerClass(71,1544.9873,-1680.7393,13.5595,56.2242,0,0,0,0,0,0); AddPlayerClass(280,1544.9873,-1680.7393,13.5595,56.2242,0,0,0,0,0,0); AddPlayerClass(281,1544.9873,-1680.7393,13.5595,56.2242,0,0,0,0,0,0); AddPlayerClass(284,1544.9873,-1680.7393,13.5595,56.2242,0,0,0,0,0,0); return 1; }
public OnGameModeInit()
{
ActorOGF = CreateActor(28, 2438.7710,-1901.5355,13.5534,322.5977); //Actor OGF
ApplyActorAnimation(ActorOGF, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0);
printf("Actor's virtual world: %d", GetActorVirtualWorld(ActorOGF); // This will get the actor's virtual world.
return 1;
}
CMD:myvw(playerid, params[])
{
new str[20];
format(str, sizeof(str), "Your virtual world is: %d", GetPlayerVirtualWorld(playerid)); // This will get your virtual world
SendClientMessage(playerid, -1, str);
return 1;
}
Are you sure you are in the same virtual world as the actor? Try creating a debug getting the actor's virtual world and your virtual world...
Here's an example: PHP Code:
|
public OnPlayerSpawn(playerid)
{
new vw = GetPlayerVirtualWorld(playerid);
SendClientMessage(playerid, -1, vw);
return 1;
}
PHP Code:
Not tested. |
public OnPlayerSpawn(playerid) { new str[128]; new vw = GetPlayerVirtualWorld(playerid); format(str, sizeof(str),"Virtual world is %d", vw); SendClientMessage(playerid, -1, str); return 1; }