21.10.2013, 17:55
(
Последний раз редактировалось Youarex; 23.10.2013 в 13:19.
)
Witch Skin
Type '/witch' to transform yourself into witch and again to transform back (rcon admin). The witch can cast spells, but since I'm busy doing other "very cool stuff", you would have to create the spells yourself. Read instructions from code-example below. Maybe it's useless script, I don't know...
Video: When a spell is being performed, the witch will wave her magic wand. Click here to see the witch skin.
[ame]http://www.youtube.com/watch?v=BAkqUUs1ecI;hd=1[/ame]
Map: https://sampforum.blast.hk/showthread.php?tid=471484
Spells: To cast a spell you just have to say it loud. For example: Duratus! (notice the exclamation mark)
Code: How to create spells yourself?
Declare a spell word in the array:
Then write special callbacks related to spell words and some code inside them:pawn Код:new my_spells[][24] =
{
"Duratus!", //freeze
"Expecto patronum!" //example
};
The rest you can hopefully figure out in the filterscript.pawn Код:SPELL:Duratus(playerid)
{
//We're going to freeze closest player for 5 seconds
new
closestid = GetClosestPlayerToPlayer(playerid, 30.0);
if(closestid != INVALID_PLAYER_ID)
{
TogglePlayerControllable(closestid, 0);
SendClientMessage(closestid, -2, "* The witch has spelled you!");
SetTimerEx("UnfreezeSpelledPlayer", 5000, 0, "i", closestid);
new str[64];
format(str, sizeof str,"* You have frozen playerid %i!", closestid);
SendClientMessage(playerid, -1, str);
}
else
{
SendClientMessage(playerid, -1, "There's nobody to freeze in this area.");
}
return 1;
}
//example
SPELL:Expecto_patronum(playerid)
{
SendClientMessage(playerid, -1, "* This is 'Expecto patronum' spell.");
//your code
return 1;
}
Download: http://www.solidfiles.com/d/b855ea78f0/