09.05.2012, 15:50
The main part of my /cow command (from old Everystuff)
Up at top
In command
In OnPlayerSpawn, OnPlayerDisconnect, or any other area where you want to remove the cow (maybe /nocow command)
MAKE SURE YOU REMOVE THE COW WHEN THEY LEAVE AT THE VERY LEAST.
Up at top
Код:
new cow[MAX_PLAYERS];
Код:
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);
Код:
if(cow[playerid]) { DestroyObject(cow[playerid]); cow[playerid] = 0; }