Scissors Command
#1

Hello!

I started to scripting command scissors command would be /cuttie and if player is tied it would cut tie and free himself.Also the would need to have scissors (scissors have to be bought in supa save),so if he wouldnt have scissors and he type cmd /cuttie it would say "You dont have any scissors to cut the rope".

Code:

Код:
#include <a_samp>
#include <fixes>
#include <core>
#include <float>
#include <sscanf2>
#include <streamer>
#include <zcmd>
#include <foreach>
#include <moneyhax>
#include <YSI\y_ini>
#include <progress>
#include <a_math>
#include <dprop>
#include <string>
#include <OPSP>

//COLORS

#define COLOR_GREY 					0xAFAFAFAA
#define COLOR_GREEN 				0x33AA33AA
#define COLOR_RED 					0xFF0000AA
#define COLOR_YELLOW 				0xFFFF00FF
#define COLOR_YELLOWSEXY 			0xF6FF00FF
#define COLOR_WHITE 				0xFFFFFFAA
#define COLOR_VIOLETBLUE 			0x8A2BE2AA
#define COLOR_DEADCONNECT 			0x808080AA
#define COLOR_BLUE 					0x0000FFFF
#define COLOR_SEXYBLUE 				0x00bbffAA
#define COLOR_FORESTGREEN 			0x228B22AA
#define COLOR_DODGERBLUE 			0x1E90FFAA
#define COLOR_DARKOLIVEGREEN		0x556B2FAA
#define COLOR_ORANGE 				0xFFA500AA
#define COLOR_PURPLE 				0x800080AA
#define COLOR_ROYALBLUE 			0x4169FFAA
#define COLOR_ERROR 				0xD2691EAA
#define COLOR_PINK 					0xFF0080FF
#define COLOR_SEXYGREEN 			0x00FF00FF
#define COLOR_LIGHTBLUE 			0x33CCFFAA
#define COLOR_LIME 					0x10F441AA
#define COLOR_ADMIN 				0xFF0066FF // Currently purple
#define COLOR_CYAN 					0x40FFFFFF
#define COLOR_ORANGERED 			0xFF4500AA
#define COLOR_SERVER 				0xbcbcbcAA
#define COLOR_BLUELIGHT2 			0x33CCFFFF
#define COLOR_BLUEEXP 				0x00ffffFF
#define COLOR_ANTICHEAT 			0xff8300FF

enum PlayerInfo
{
    Pass[129], //User's password
    Adminlevel, //User's admin level
    VIPlevel, //User's vip level
	VipDate,
    Money, //User's money
    Min,
    Hour,
    Sec,
    Days,
    Scores, //User's scores
	XP,     // EXP :D
    Kills, //User's kills
    Deaths, //User's deaths
    Banned, // User Banned Check
    Wanted,
    JailTime,
    Jailed,
    Job,
    FStyle,
	Placehit,
    C4,
    Tie,
    BreakC,

    bool: USER_LOGGED_IN
}
new pInfo[MAX_PLAYERS][PlayerInfo]; //This will create a new variable so we can later use it to saving/loading user's info.

new tie_time[MAX_PLAYERS];




CMD:cuttie(playerid, params[])
{
    new string[128], targetid;
    new pName[MAX_PLAYER_NAME];
    new pName2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(targetid, pName2, sizeof(pName2));
    
   	if(pInfo[playerid][BreakC] == 0)
	{
		SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF} You dont have any scissors!.");
		return 1;
	}

		if(bcprob == 1 || bcprob == 3 || bcprob == 4)
		{
            TogglePlayerControllable(targetid, 1);
            KillTimer(tie_time[targetid]);
		    format(string, sizeof(string), "[UN-TIE]{FFFFFF} You have un-tied yourself!", pName2);
		    SendClientMessage(playerid, COLOR_YELLOW, string);

		}
    return 1;
}
Reply
#2

you haven't actually listed your problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)