XAnimals
#1

My First Script Ive Ever Made !!!!! + Its Offical...



XAnimal Farm Makes You Look Like An XAnimal, For Example If I Type /Turtle I Change Into A Turtle (A Object Is Placed On Me)

XAnimals:

1.Monkey
2. Chicken
3. Dolphin
4.Shark
5. Turtle

Steps:


1. Add This At The Top Of Your GameMode Under #include <a_samp>
Код:
#define COLOR_RED 0xAA3333AA
new turtle;
new shark;
new dolphin;
new chicken;
new monkey;
#pragma tabsize 0
2.Add This Under public OnPlayerCommandText(playerid, cmdtext[])
{


Код:
if (strcmp(cmdtext, "/monkey", true) == 0)
	{
 monkey = CreateObject(13667,0.00,0.00,0.00,0.00,0.00,0.00);
 SendClientMessage(playerid,COLOR_RED,"You Are Having A Monkey");
 AttachObjectToPlayer(playerid,monkey,0.00,0.00,0.00,0.00,0.00,0.00);
 return 1;
 }
if (strcmp(cmdtext, "/dolphin", true) == 0)
	{
 dolphin = CreateObject(1609,0.00,0.00,0.00,0.00,0.00,0.00);
 SendClientMessage(playerid,COLOR_RED,"You Are Having A Dolphin");
 AttachObjectToPlayer(playerid,dolphin,0.00,0.00,0.00,0.00,0.00,0.00);
 return 1;
 }
if (strcmp(cmdtext, "/shark", true) == 0)
	{
 shark = CreateObject(1608,0.00,0.00,0.00,0.00,0.00,0.00);
 SendClientMessage(playerid,COLOR_RED,"You Are Having A Shark");
 AttachObjectToPlayer(playerid,shark,0.00,0.00,0.00,0.00,0.00,0.00);
 return 1;
 }
if (strcmp(cmdtext, "/chicken", true) == 0)
	{
 chicken = CreateObject(16776,0.00,0.00,0.00,0.00,0.00,0.00);
 SendClientMessage(playerid,COLOR_RED,"You Are Having A Chicken");
 AttachObjectToPlayer(playerid,chicken,0.00,0.00,0.00,0.00,0.00,0.00);
  return 1;
 }
if (strcmp(cmdtext, "/turtle", true) == 0)
	{
 turtle = CreateObject(1609,0.00,0.00,0.00,0.00,0.00,0.00);
 SendClientMessage(playerid,COLOR_RED,"You Are Having A Turtle");
 AttachObjectToPlayer(playerid,turtle,0.00,0.00,0.00,0.00,0.00,0.00);
		return 1;
		}
Your Done!

Credits: Me For Scripting This Gamemode Addon
Credits: Samp Wiki For Teaching Me How To Use AttachObjectToPlayer
Credits: Sa:mp For Making This Cool Mod! :P
This May Not Be The Best Script You Have Ever Seen But Dont Complain, Its My First, Just Say What I Can Improve
Reply
#2

screenshots?
Reply
#3

Seems kinda fun, I will test it out later.

Klutty
Reply
#4

Couple of noticements:

1) I Don't Like People Writing Like This. Annoying.
2) What happends if a player type /turtle and /turtle and abuse the command? Use a variable.
3) This is neither an filterscript or an include... find one topic called "Useful snippets",

Leopard
Reply
#5

AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ)

is true

you use:
AttachObjectToPlayer(playerid,objectid , Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ)

you tell that the player is attach to the objet you ^^

you need change the name of objet for the playerid, and the playerid for the name
Reply
#6

Well this isn't similar to SeaSuits by Thomas_Conroy

except that one actually uses offsets to make the animals look better as well as variables
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)