SA-MP Forums Archive
whats this camoflauge crap? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: whats this camoflauge crap? (/showthread.php?tid=68316)



whats this camoflauge crap? - Drift_04 - 09.03.2009

ok so supposedly on littlewhiteys u can be camoflauged like a bush, i havent tried it yet, but if you can, how do you it?


Re: whats this camoflauge crap? - introzen - 09.03.2009

GetPlayerPos()
CreateObject()


Re: whats this camoflauge crap? - Vince - 09.03.2009

Correction:

AttachObjectToPlayer()


Re: whats this camoflauge crap? - introzen - 09.03.2009

Quote:
Originally Posted by Vince
Correction:

AttachObjectToPlayer()
that might be little easier xD


Re: whats this camoflauge crap? - Drift_04 - 09.03.2009

ok so uhh when i use attachobjecttoplayer i have to use it like AttachObjectToPlayer(objectid,playerid)

but that wont work in the way i wanna use it cuz i wanna make it so u type in a command and it costs money and you can be transformed into a bush.

so do i use getplayerid? or what?


Re: whats this camoflauge crap? - SpiderPork - 09.03.2009

First create an object then attach it to the player.


Re: whats this camoflauge crap? - Danut - 09.03.2009

[pawn]

new bushee;

//OnGameModeInit

bushee = CreateObject(id,x,y,z,rx,ry,rz);

//Command

AttachObjectToPlayer(bushee,playerid);


Re: whats this camoflauge crap? - harrold - 09.03.2009

Quote:
Originally Posted by Danut
[pawn]

new bushee;

//OnGameModeInit

bushee = CreateObject(id,x,y,z,rx,ry,rz);

//Command

AttachObjectToPlayer(bushee,playerid);
Nonononononono Wrong!!!

Because you need to create much more objects!
if you create 1 object then it wil move everytime anybody do the command

[pawn]// At The Top Of your Script
new Bushee[MAX_PLAYERS];

// in OnPlayerCommandText
if(GetPlayerMoney(playerid) <= 1000) return SendClientMessage(playerid, COLOR, "You need 1000$");
Bushee[playerid] = CreateObject(OBJECT_ID,0,0,0,0,0,0);
AttachObjectToPlayer(Bushee,playerid);


Re: whats this camoflauge crap? - Drift_04 - 09.03.2009

ro harrold i used ur idea and i got this error.

Код:
C:\Users\rac\Desktop\gtasa and samp\gamemodes\choice.pwn(519) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
it said that this was the error.

AttachObjectToPlayer(Bushee,playerid);


Re: whats this camoflauge crap? - ICECOLDKILLAK8 - 09.03.2009

pawn Код:
// OnGameModeInit
new bush[MAX_PLAYERS] = CreateObject(...,...,...);
// OnPlayerCommandText
AttachObjectToPlayer(bush[playerid],playerid);
Should work