Little help nedded
#1

Hi i am modify this FS for my server:

Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#include zcmd
#include sscanf

#define PATH "/Database/%s.ini"
#define COLOR_GREY 0xAFAFAFAA
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COLOR_LIGHTBLUE 0xADD8E6FF
#define COLOR_FADE1 0xFFFFFFFF
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_LIGHTGREEN 0x90EE90FF
#define COLOR_MEDIUMPURPLE 0x9370DBFF
#define COLOR_GOLD 0xFFD700FF
#define COLOR_LIGHTSKYBLUE 0x87CEFAFF
#define COLOR_CRIMSON 0xDC143CFF
#define COLOR_YELLOW 0xFFFF00AA

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Handcuff System by Tee ");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}
#endif


COMMAND:cuff(playerid, params[])
{
new id,Cuff[MAX_PLAYERS],Name[MAX_PLAYER_NAME],string[MAX_PLAYERS],pskin = GetPlayerSkin(playerid);
for (new i=0; i<MAX_PLAYERS; i++){
if(pskin == 265 || pskin == 266 || pskin == 267 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 28{
if(sscanf(params,"u", id))return SendClientMessage(playerid, 0xFFFF00AA, "Usage: /cuff [id]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You can't cuff someone from a vehicle.");
if(id == playerid)return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You cannot cuff yourself.");
if(GetDistanceBetweenPlayers(playerid,id)> 2)return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You are too far from that player!");
}else return SendClientMessage(playerid,0xC0C0C0FF,"[INFO]You dont have permisson to access this command.");
{
TogglePlayerControllable(id,false);
}
{
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "[INFO]you have been handcuffed by Officer %s.",Name);
}SendClientMessage(playerid,0xFFFF00AA,string);
}
Cuff[id] = 1;
return 1;
}

COMMAND:uncuff(playerid, params[])
{
new id,Cuff[MAX_PLAYERS],Name[MAX_PLAYER_NAME],string[MAX_PLAYERS],pskin = GetPlayerSkin(playerid);
for (new i=0; i<MAX_PLAYERS; i++){
if(pskin == 265 || pskin == 266 || pskin == 267 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 28{
if(sscanf(params,"u", id))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /uncuff [id]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "[INFO]Player not found.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You can't uncuff someone from a vehicle.");
if(id == playerid)return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You cannot uncuff yourself.");
if(GetDistanceBetweenPlayers(playerid,id)> 2)return SendClientMessage(playerid,0xFFFF00AA,"[INFO]You are to far from that player");
}else return SendClientMessage(playerid,0xC0C0C0FF,"[INFO]You dont have permisson to access this command.");
{
TogglePlayerControllable(id,true);
}
{
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "[INFO]Your handcuffs are been removed by Officer %s.",Name);
}SendClientMessage(i,0xFFFF00AA,string);
}
Cuff[id] = 0;
return 1;
}

//-------------------------------DISTANCE-------------------------------------//
stock GetDistanceBetweenPlayers(playerid,playerid2)
{
new Float1,Float:y1,Float:z1,Float2,Float:y2,Float :z2;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
GetPlayerPos(playerid2,x2,y2,z2);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2 )+floatpower(floatabs(floatsub(y2,y1)),2)+floatpow er(floatabs(floatsub(z2,z1)),2));
return floatround(tmpdis);
}

But i got this error:

Quote:

C:\Documents and Settings\Luca\Desktop\BaseScript\Handcuffs.pwn(7) : fatal error 100: cannot read from file: "sscanf"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#2

You have to put the Include
Reply
#3

lol that was the old cuff tee maded and download the sscanf include with the plugin
Reply
#4

First of all, it's not
pawn Код:
#include <a_samp>
#include zcmd
#include sscanf
But
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
However, download the newest versionhere
Reply
#5

now i got this error:

Quote:

C:\Documents and Settings\Luca\Desktop\BaseScript\Handcuffs.pwn(40) : error 026: no matching "#if..."
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

FIxED...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)