Setting Object Texture ? - 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: Setting Object Texture ? (
/showthread.php?tid=483669)
Setting Object Texture ? -
Jhony_Blaze - 27.12.2013
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!
Re: Setting Object Texture ? -
Don_Cage - 27.12.2013
put object under Public OnGameModeInit not Connect
Re: Setting Object Texture ? -
xVIP3Rx - 27.12.2013
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)"...
Re: Setting Object Texture ? -
Jhony_Blaze - 27.12.2013
Thank you very much Vip3r
It worked, I love this forum, I always get help when I need.