05.01.2014, 14:11
(
Последний раз редактировалось [SU]Spartan; 06.01.2014 в 14:39.
)
Hello,
I've decided to make this topic to help scripting newbies with stunt server.
Adding MAPS from MTA: Open file computer then go to HARD DISK C: then open program files and search for MTA San Andreas ,when you find this file double click to open it.Then open MODS file then deathmach and then resources search for the map you want,open it and click on .MAP file.
On easy steps:My computer>> HARD DISK (C >> program files >> MTA San Andreas >> MODS >> Deathmatch >> resources >> [MAP NAME] >> .MAP File>> Copy .MAP file
Converting the objects from MTA to SA-MP: For this visit convertffs.com then paste the .MAP File on "PASTE HERE" and change the configuration below.If your using streamer include add
on the top
Convertffs.com configuration picture:
Placing the converted file on PAWNO:
Making /clockon and /clockoff: for STRCMP users:
for ZCMD users:
Making /teleports with CLIENT MESSAGE
Making /teleports with DIALOGBecause it is too big you can find my filterscript here:[/b] [FilterScript]Teleport to all places
Animation listAnimation list is also too big so look my filterscript and get an idea[/b]Animation script by [SU]Spartan
Making /kill command
Making /god command
How to use SetPlayerPosTo use this you will need to have saved a position in game with /save <save name>
After you saved a positon go to MY Files and search SAVEDPOSITIONS.TXT then click on a line and select somenumbers because this is quite hard i have choosen to show you with pictures: Dont forget SetPlayerPos usage is SetPlayerPos(playerid, location);
Now making /fixmycar command
About OnPlayerEnterVehicle This is used for when a player enters in a car either as passanger or driver,Then if you want to send him a client message which will help him with car system look below
Well the usage is
About public OnPlayerExitVehicleThis is used for when a player exits a car,if you want to inform him that he left his car use the below
If you want to tell him that his car will be removed use the below
Using AllowPlayerTeleportThis will allow a player to go at map and right click on a place and teleport him to there
Go on playerconnect and write this
Then go at the bottom and add this
This is all for now thanks you for viewing my help topic
I would suggest you to use Scripting Machine instead of pawn.You can see all Scripting editors here: https://sampwiki.blast.hk/wiki/Scripting_Editors
I've decided to make this topic to help scripting newbies with stunt server.
Adding MAPS from MTA: Open file computer then go to HARD DISK C: then open program files and search for MTA San Andreas ,when you find this file double click to open it.Then open MODS file then deathmach and then resources search for the map you want,open it and click on .MAP file.
On easy steps:My computer>> HARD DISK (C >> program files >> MTA San Andreas >> MODS >> Deathmatch >> resources >> [MAP NAME] >> .MAP File>> Copy .MAP file
Converting the objects from MTA to SA-MP: For this visit convertffs.com then paste the .MAP File on "PASTE HERE" and change the configuration below.If your using streamer include add
Код:
#include <streamer>
Convertffs.com configuration picture:
Placing the converted file on PAWNO:
Making /clockon and /clockoff: for STRCMP users:
Код:
if (strcmp("/clockoff", cmdtext, true) == 0) { SendClientMessage(playerid, 0x4EDED7FF, "You have set your clock OFF!"); TogglePlayerClock(playerid, 0); return 1; }
Код:
CMD:clockoff { SendClientMessage(playerid, 0x4EDED7FF, "You have set your clock OFF!"); TogglePlayerClock(playerid, 0); return 1; }
Код:
if (strcmp("/teles", cmdtext, true, 10) == 0) { SendClientMessage(playerid , 0xFFFFFFAA,"____________________-----------------______________"); SendClientMessage(playerid , 0x2641FEAA,"Server teleports"); SendClientMessage(playerid , 0x2641FEAA,"/sfair /lvair /lsair /ls /lv /sf /christmas /light_place /basketcar"); SendClientMessage(playerid , 0x2641FEAA,"/treehouse /27marketls /casino /lsheavynlybar /home /tune1 /tune2 /tune3 /tune4 /tune soon /drift to come"); SendClientMessage(playerid , 0xFFFFFFAA,"____________________-------------__________________"); return 1; }
Animation listAnimation list is also too big so look my filterscript and get an idea[/b]Animation script by [SU]Spartan
Making /kill command
Код:
if(!strcmp("/kill", cmdtext, true)) { SetPlayerHealth(playerid, 0); SendClientMessage(playerid, 0xFFFFFFAA, "You have commited suicidie"); return 1; }
Код:
if(!strcmp("/god", cmdtext, true)) { SetPlayerHealth(playerid, 100000000.0); SendClientMessage(playerid, 0xFFFFFFAA, "You have enabled god mode on you."); }
After you saved a positon go to MY Files and search SAVEDPOSITIONS.TXT then click on a line and select somenumbers because this is quite hard i have choosen to show you with pictures: Dont forget SetPlayerPos usage is SetPlayerPos(playerid, location);
Now making /fixmycar command
Код:
if (!strcmp("/fixmycar", cmdtext)) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!"); RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!"); return 1; }
Well the usage is
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { SendClientMessage(playerid,0x0000BBAA,"Use /fixmycar to fix your car"); return 1; }
Код:
public OnPlayerExitVehicle(playerid, vehicleid) { SendClientMessage(playerid,0x0000BBAA,"You left your car"); return 1; }
Код:
public OnPlayerExitVehicle(playerid, vehicleid) { SendClientMessage(playerid,0x0000BBAA,"------------=[VEHICLE EXIT HELP]=----------------"); SendClientMessage(playerid,0x0000BBAA,"Ur car has been removed Use /car to spawn another car"); SendClientMessage(playerid,0x0000BBAA,"------------=[VEHICLE EXIT HELP END]=------------"); new currentveh; currentveh = GetPlayerVehicleID(playerid); DestroyVehicle(currentveh); return 1; }
Using AllowPlayerTeleportThis will allow a player to go at map and right click on a place and teleport him to there
Go on playerconnect and write this
Код:
public OnPlayerConnect(playerid) { AllowPlayerTeleport( playerid, 1 ); return 1; }
Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) { SetPlayerPosFindZ(playerid, fX, fY, fZ); return 1; }
I would suggest you to use Scripting Machine instead of pawn.You can see all Scripting editors here: https://sampwiki.blast.hk/wiki/Scripting_Editors