SA-MP Forums Archive
My list of what i need help with. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: My list of what i need help with. (/showthread.php?tid=276029)



My list of what i need help with. - Shockey HD - 12.08.2011

1. Have all cars start turned off

2. Tutorial on Car Dealership (no MYSQL)

Can anyone help me.

I want all cars to be state Engine= False.


Re: My list of what i need help with. - PrawkC - 12.08.2011

1 : https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights

2: Search


Re: My list of what i need help with. - Shockey HD - 12.08.2011

Okay, Thanks for the engines and lights thing. but it seems like i cant find a GOOD Dealership. I want to make my own.

2. Maybe you can help with out with this code.

pawn Код:
CMD:cuff(playerid,params[])
{
    new id,string[128];
    if(sscanf(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /cuff [ID]");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Player Not Connected!");
    else
    {
        format(string, sizeof(string), "You Were Cuffed");
        GameTextForPlayer(playerid, string, 500, 4);
        TogglePlayerControllable(id,0);
    }
    return 1;
}
How can i make it so you must be 3 feet away to use


Re: My list of what i need help with. - BigAl - 12.08.2011

^^
Код:
if(!IsPlayerInRangeOfPoint(playerid, XPos, YPos, ZPos);
Try that


Re: My list of what i need help with. - Darnell - 12.08.2011

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

pawn Код:
CMD:cuff(playerid,params[])
{
    new id,string[128];
    if(sscanf(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /cuff [ID]");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Player Not Connected!");
    else
    {
        format(string, sizeof(string), "You are cuffed");
        GameTextForPlayer(playerid, string, 500, 4);
        TogglePlayerControllable(id,0);
    }
    else
    {
        if (IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z))
    {
          // freezing player because of cuff.
    return 1;
}
* I'm not sure this code works, I typed it here.


Re: My list of what i need help with. - PrawkC - 12.08.2011

pawn Код:
CMD:cuff(playerid,params[])
{
    new id,string[128], Float:X, Float:Y, Float:Z;
    if(sscanf(params, "u",id)) return SendClientMessage(playerid,COLOR_RED,"Usage: /cuff [ID]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Error: Player Not Connected!");
    GetPlayerPos(id, X, Y, Z);
    if(!IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)) return SendClientMessage(playerid, -1, "You're not in range of that player!");
    ///
    format(string, sizeof(string), "You Were Cuffed");
    GameTextForPlayer(playerid, string, 500, 4);
    TogglePlayerControllable(id,0);
    return 1;
}