15.11.2010, 00:25
I want it to work on same way in this video: [ame="http://www.youtube.com/watch?v=diWtKnc68GY"]VIDEO[/ame]
1. Enter checkpoint then "Type /robsex to rob the sex shop"
2. Then Type "/robsex"
3. Then "Robbery complete, You robbed (Random money) from the sex shop"
4. (PlayerName + How much he/she robbed) sould show up si evryone can see it like "[Lvrcr]Larsey123(3) has robbed (random money) from the sex shop"
The scipt look like this now:
1. Enter checkpoint then "Type /robsex to rob the sex shop"
2. Then Type "/robsex"
3. Then "Robbery complete, You robbed (Random money) from the sex shop"
4. (PlayerName + How much he/she robbed) sould show up si evryone can see it like "[Lvrcr]Larsey123(3) has robbed (random money) from the sex shop"
The scipt look like this now:
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_DARKRED 0xAA3333AA
#pragma tabsize 0;
//Checkpoints
new RobSexShop;
//Forwards
forward Sex(playerid);
public OnFilterScriptInit()
{
//Checkpoints
RobSexShop = CreatePickup(1273, 23, -103.82875823975,-22.51379776001,999.71875); //ExitSexShop
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
//RobSexShop~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if( pickupid == RobSexShop){
SendClientMessage(playerid,COLOR_DARKRED,"/robsex to rob the Sex Shop");
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/robsex", cmdtext, true, 10) == 0)
{
SetTimer("Sex",300000,true);
new rand = random(50000)+45000;
GivePlayerMoney(playerid, rand);
new weprand = random(1)+0;
GivePlayerWeapon(playerid, weprand, 150);
}
return 1;
}
public Sex(playerid)
{
SendClientMessage(playerid,COLOR_DARKRED,"The Sex Shop has redencly been robbed!!!");
return 1;
}