Larsey123IsMe
Unregistered
Quote:
Originally Posted by mmrk
Maybe something liks this:
pawn Код:
#include <a_samp> #define COLOR_DARKRED 0xAA3333AA
new gRobbed[MAX_PLAYERS];
//Checkpoints new RobSexShop; //Forwards forward Sex(playerid); forward RobTimer(playerid);
public OnFilterScriptInit() { //Checkpoints RobSexShop = CreatePickup(1273, 23, -103.82875823975,-22.51379776001,999.71875); //ExitSexShop SetTimer("RobTimer", 1000, 1); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { //RobSexShop~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if( pickupid == RobSexShop) { SendClientMessage(playerid,COLOR_DARKRED,"/robsex to rob the Sex Shop"); } return 0; } public OnPlayerConnect(playerid) { gRobbed[playerid] = 0; return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp(cmdtext, "/robsex", true)) { new moneyrand = random(50000)+45000, weprand = random(1)+0 ; if(gRobbed[playerid] != 0) return SendClientMessage(playerid, COLOR_DARKRED, "The Sex Shop has redencly been robbed!!!"); GivePlayerMoney(playerid, moneyrand); GivePlayerWeapon(playerid, weprand, 150); gRobbed[playerid] = 300; return 1; } return 0; } public RobTimer(playerid) { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(gRobbed[i] > 0) { gRobbed[i]--; } } } return 1; }
|
Thanks, that work