Objects does not appear
#1

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;
}
Reply
#2

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

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?
Reply
#4

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
Reply
#5

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

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

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

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)