#7

The main part of my /cow command (from old Everystuff)

Up at top
Код:
new cow[MAX_PLAYERS];
In command
Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
cow[playerid] = CreateObject(11470,x,y,z-2,0.0,0.0,0.0);
AttachObjectToPlayer(cow[playerid], playerid, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0);
In OnPlayerSpawn, OnPlayerDisconnect, or any other area where you want to remove the cow (maybe /nocow command)
Код:
if(cow[playerid])
{ 
    DestroyObject(cow[playerid]);
    cow[playerid] = 0;
}
MAKE SURE YOU REMOVE THE COW WHEN THEY LEAVE AT THE VERY LEAST.
Reply


Messages In This Thread
Cow. - by Edin Black - 09.05.2012, 15:26
Re: Cow. - by HDFord - 09.05.2012, 15:27
Re: Cow. - by Edin Black - 09.05.2012, 15:30
Re: Cow. - by HDFord - 09.05.2012, 15:38
Re: Cow. - by Edin Black - 09.05.2012, 15:40
Re: Cow. - by HDFord - 09.05.2012, 15:46
Re: Cow. - by kaisersouse - 09.05.2012, 15:50
Re: Cow. - by Edin Black - 09.05.2012, 15:55
Re: Cow. - by HDFord - 09.05.2012, 15:58
Re: Cow. - by kaisersouse - 09.05.2012, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)