SA-MP Forums Archive
Rob scripting help - 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: Rob scripting help (/showthread.php?tid=431783)



Rob scripting help - yaron0600 - 19.04.2013

Hey I've created this command :


Код:
CMD:rob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1595.5406, 2198.0520, 10.3863))
    {
	SendClientMessageEx(playerid, COLOR_WHITE, "You're not at bank safes room!");
	return 1;
	}
    if (PlayerInfo[playerid][pHummer] == 0) {
    SendClientMessageEx(playerid,COLOR_GREY,"   You need a Hammer from a craftsman to break the lock of the safe!");
    return 1;
    }
    if (PlayerInfo[playerid][pScrewdriver] == 0) {
    SendClientMessageEx(playerid,COLOR_GREY,"   You need a screwdriver from a craftsman to screw the screws out of the door and than break it!");
    return 1;
    }
How can I add this the rest of that for if u succed thats what this is giving u , That if u enter the checkpoint u get 10k$...

Код:
{
On PlayerSetCheckPoint
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    SendClientMessageEx(playerid,COLOR_WHITE,"  You succed take the bag fully with the money , Now all the rest is escape from cops radars!");
    return 1;
}

{
On PlayerEnter Checkpoint...
    GivePlayerMoney(playerid, 10000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}



Re: Rob scripting help - yaron0600 - 20.04.2013

Anyone ?! ?! !?


Re: Rob scripting help - Giroud12 - 20.04.2013

just add
pawn Код:
CMD:rob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1595.5406, 2198.0520, 10.3863))
    {
    SendClientMessageEx(playerid, COLOR_WHITE, "You're not at bank safes room!");
    return 1;
    }
    if (PlayerInfo[playerid][pHummer] == 0) {
    SendClientMessageEx(playerid,COLOR_GREY,"   You need a Hammer from a craftsman to break the lock of the safe!");
    return 1;
    }
    if (PlayerInfo[playerid][pScrewdriver] == 0) {
    SendClientMessageEx(playerid,COLOR_GREY,"   You need a screwdriver from a craftsman to screw the screws out of the door and than break it!");
    return 1;
    }
{
On PlayerSetCheckPoint
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    SendClientMessageEx(playerid,COLOR_WHITE,"  You succed take the bag fully with the money , Now all the rest is escape from cops radars!");
    return 1;
}

{
On PlayerEnter Checkpoint...
    GivePlayerMoney(playerid, 10000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}



Re: Rob scripting help - Faisal_khan - 20.04.2013

pawn Код:
new RobSucess[MAX_PLAYERS];

CMD:rob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1595.5406, 2198.0520, 10.3863))    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You're not at bank safes room!");
        return 1;
    }
    if (PlayerInfo[playerid][pHummer] == 0) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You need a Hammer from a craftsman to break the lock of the safe!");
        return 1;
    }
    if (PlayerInfo[playerid][pScrewdriver] == 0) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You need a screwdriver from a craftsman to screw the screws out of the door and than break it!");
        return 1;
    }
    RobSucess[playerid] = 0;
    return 1;
}


On PlayerSetCheckPoint
{
    if(RobSucess[playerid] == 0)
    {
        SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
        SendClientMessageEx(playerid,COLOR_WHITE,"  You succed take the bag fully with the money , Now all the rest is escape from cops radars!");
    }
    return 1;
}

On PlayerEnter Checkpoint...
{
    if(RobSucess[playerid] == 0)
    {
        GivePlayerMoney(playerid, 10000);
        DisablePlayerCheckpoint(playerid);
    }
    return 1;
}