Setting Object Texture ?
#1

I tried to SetPlayerObjectMaterial, but I get some errors, this is how I tried

Codes:
Код:
new test[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
//this is the line 55	test(playerid) = CreatePlayerObject(playerid, 11319, -2012.15479, 68.69633, 30.66225, 0.00000, 0.00000, 90.00000);
	SetPlayerObjectMaterial(playerid, test[playerid], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0);


These are the errors:
Код:
C:\Documents and Settings\Attila\My Documents\server\gamemodes\grandlarc.pwn(55) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Attila\My Documents\server\gamemodes\grandlarc.pwn(55) : warning 215: expression has no effect
C:\Documents and Settings\Attila\My Documents\server\gamemodes\grandlarc.pwn(55) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Attila\My Documents\server\gamemodes\grandlarc.pwn(55) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Attila\My Documents\server\gamemodes\grandlarc.pwn(55) : fatal error 107: too many error messages on one line
Thank You!
Reply
#2

put object under Public OnGameModeInit not Connect
Reply
#3

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
put object under Public OnGameModeInit not Connect
It's a player object.. So it should be created under OnPlayerConnect

OT: It's
pawn Код:
test[playerid] = CreatePlayerObject(playerid, 11319, -2012.15479, 68.69633, 30.66225, 0.00000, 0.00000,
90.00000);
not "test(playerid)"...
Reply
#4

Thank you very much Vip3r It worked, I love this forum, I always get help when I need.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)