SA-MP Forums Archive
How to make - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make (/showthread.php?tid=625529)



How to make - Learn - 03.01.2017

How to make street email system for roleplay server, phone street for roleplay server, picklock (stealcar), breakin house (rob house) systems? It's hard to make it?


Re: How to make - oMa37 - 03.01.2017

You can make them by hard work, Learn PAWN.
Nothing easy at the first time.


Re: How to make - saffierr - 03.01.2017

If you have no knowledge at all with PAWN, Uhm? Yep, it is hard.
Try to learn the basics first.


Re: How to make - Learn - 03.01.2017

Quote:
Originally Posted by saffierr
Посмотреть сообщение
If you have no knowledge at all with PAWN, Uhm? Yep, it is hard.
Try to learn the basics first.
I can learn every code from the samp wiki, or they dont have all the information?


Respuesta: How to make - Whillyrez - 03.01.2017

It doesn't work to learn all wiki if you don't understand the logic. Try to read/understand simple codes.


Re: Respuesta: How to make - Learn - 03.01.2017

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
It doesn't work to learn all wiki if you don't understand the logic. Try to read/understand simple codes.
When I read codes I understand the codes, but write the codes without look other codes it's hard. I know it's simple to make "lockpick (stealcar) system" but It's hard to me cuz I dont know from where to learn and take the information. thanks about the comment and help!


Re: How to make - saffierr - 03.01.2017

The best way to start imo, is scripting easy commands such as /heal - /armour - /giveweapon


Respuesta: How to make - Whillyrez - 03.01.2017

I think no one knows all the codes by memorie... Whenever I got problems with a script I try to search for a similar script and see how someone did it. Just search in ******.


Re: Respuesta: How to make - Learn - 03.01.2017

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
I think no one knows all the codes by memorie... Whenever I got problems with a script I try to search for a similar script and see how someone did it. Just search in ******.
You true, I search but didnt found... I success to find how to create others system and more things like that, but how to create pvlock system for steal cars with screwdriver, and build phone street and etc... I didnt success to found


Respuesta: How to make - Whillyrez - 03.01.2017

Try another way of searching, for example...
Whenever I try to make a vehicle ownership system, I use a registration system(of a player) and I edit it... until it looks like a vehicle ownership.(Just an example)
Within the the system to steal cars, it's easily, just use SetVehicleParamsEx and in the parameter doors use a "0" in the nearest car of the player. Something like this:
PHP код:
stock GetClosestVehicle(playerid, Float:range) //Function of WooTFTW
{
    new     
Float:p_X;
    new     
Float:p_Y;
    new     
Float:p_Z;
    new     
Float:Distance;
    new     
Float:PretendentDistance = range +1;
    new     
Pretendent;
    
GetPlayerPos(playerid, p_X, p_Y, p_Z);
    for(new 
vehicleid=1; vehicleid < MAX_VEHICLES; vehicleid++)
    {
        
Distance = GetVehicleDistanceFromPoint(vehicleid, p_X, p_Y, p_Z);
        if(
Distance <= range && Distance <= PretendentDistance)
        {
            
Pretendent = vehicleid;
            
PretendentDistance = Distance;
        }
    }
    return 
Pretendent;
} 
Now the command. You should use ZCMD
PHP код:
CMD:stealcar(playerid, params[])
{
new 
vehicleid, engine, lights, alarm, doors, bonnet, boot, objective; 
vehicleid = GetClosestVehicle(playerid, 1);
SetVehicleParamsEx(vehicleid,engine,lights,alarm,0,bonnet,boot,objective);
SendClientMessage(playerid, -1,"You opened the doors of the car/cars in a radio of 1");
return 
1;
} 
This command is very simple, then you will have to edit it.