hotwire help
#1

hello. I need help with a command:

Код:
if(strcmp(cmd, "/hotwire", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pJob] == 5)
{
TogglePlayerControllable(playerid, 1);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!");
}
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!");
}
return 1;
}
can someone make this like /hotwire and playername is tryng to hotwire the engine but doesen't start and when you write /hotwire again then again playername is tryng to hotwire a car and engine starts. I want like this, that if your carjacking ,or whatever it is called, skill is low then the starting rate is less, if you have a higher carjacking skill you can start the car more easily and the starting rate to not starting is bigger. Hope i wrote it understanably but i really need some help. Thank you anyway.
Reply
#2

You will need a skill varible for every player, to state their skill, and some maths.

Also this: https://sampwiki.blast.hk/wiki/Random
Reply
#3

I got part of it for you, someone will have to finish it, I don't work with roleplay scripts so I can not finish it.
pawn Код:
if(strcmp(cmd, "/hotwire", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(PlayerInfo[playerid][pJob] == 5)
        {
            new string[256];
            new name[MAX_PLAYERS];
            GetPlayerName(playerid, name, sizeof(name));
            TogglePlayerControllable(playerid, 1);
            format(string,sizeof(string),"%s starts to hotwire a car.",name);
            SendClientMessageToAll(COLOR_HERE,string);
        }
        else
        {
            SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!");
    }
    return 1;
}
EDIT: The guy above posted while I was typing, do pay attention to what he said.
Reply
#4

Quote:
Originally Posted by Яσскѕтая
Посмотреть сообщение
I got part of it for you, someone will have to finish it, I don't work with roleplay scripts so I can not finish it.
pawn Код:
if(strcmp(cmd, "/hotwire", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(PlayerInfo[playerid][pJob] == 5)
        {
            new string[256];
            new name[MAX_PLAYERS];
            GetPlayerName(playerid, name, sizeof(name));
            TogglePlayerControllable(playerid, 1);
            format(string,sizeof(string),"%s starts to hotwire a car.",name);
            SendClientMessageToAll(COLOR_HERE,string);
        }
        else
        {
            SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!");
    }
    return 1;
}
EDIT: The guy above posted while I was typing, do pay attention to what he said.
can someone finish it i don't know about /hotwire anything
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)