SA-MP Forums Archive
Objects does not appear - 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: Objects does not appear (/showthread.php?tid=584525)



Objects does not appear - Fancy - 05.08.2015

I have this command but the objects doest not appear

Код:
new Cage[MAX_PLAYERS][4];
CMD:cage(playerid, params[])
{
	        new str[128], id, Float:x, Float:y, Float:z;
		GetPlayerPos(id, x, y, z);
		format(str, sizeof(str), "You caged %s(%d)", GetName(id), id);
		SendClientMessage(playerid, BAN, str);
		PlayerInfo[playerid][cage] = 1;
		PlayerInfo[id][CageC]++;
		Cage[id][0]  = CreateObject(985, x, y+4, z, 0.0, 0.0, 0.0);
		Cage[id][1] = CreateObject(985, x+4, y, z, 0.0, 0.0, 90.0);
		Cage[id][2] = CreateObject(985, x-4, y, z, 0.0, 0.0, 270.0);
		Cage[id][3] = CreateObject(985, x, y-4, z, 0.0, 0.0, 180.0);
	        return 1;
}



Re : Objects does not appear - KillerDVX - 05.08.2015

Are you sure you didn't pass the limits of "CreateObject" in your GameMode?


Re: Re : Objects does not appear - Fancy - 05.08.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
Are you sure you didn't pass the limits of "CreateObject" in your GameMode?
I dont know but what should i do if i pass the limit?
and does the tube connector uses the function CreateObject?


Re: Re : Objects does not appear - VanillaRain - 05.08.2015

Quote:
Originally Posted by Fancy
Посмотреть сообщение
I dont know but what should i do if i pass the limit?
and does the tube connector uses the function CreateObject?
use the streamer include


Re: Re : Objects does not appear - Fancy - 05.08.2015

Quote:
Originally Posted by VanillaRain
Посмотреть сообщение
use the streamer include
already using


Re: Objects does not appear - HazardouS - 05.08.2015

If you're using Streamer, you should consider using CreateDynamicObject instead of CreateObject.


Re: Objects does not appear - Abagail - 05.08.2015

Is your playerid 0? You define id but never actually change the value.


Re: Objects does not appear - IgorLuiz - 05.08.2015

Put thereby, to use "CreateDynamicObject" be needed "Streamer Plugin"

Link:Streamer Plugin

PHP код:
new Cage[MAX_PLAYERS][4];
CMD:cage(playeridparams[])
{
   new 
str[128], idFloat:xFloat:yFloat:z;
   
GetPlayerPos(idxyz);
   
format(strsizeof(str), "You caged %s(%d)"GetName(id), id);
   
SendClientMessage(playeridBANstr);
   
PlayerInfo[playerid][cage] = 1;
   
PlayerInfo[id][CageC]++;
   
Cage[id][0]  = CreateDynamicObject(985xy+4z0.00.00.0);
   
Cage[id][1] = CreateDynamicObject(985x+4yz0.00.090.0);
   
Cage[id][2] = CreateDynamicObject(985x-4yz0.00.0270.0);
   
Cage[id][3] = CreateDynamicObject(985xy-4z0.00.0180.0);
   return 
1;