2 scripts
#1

Helloo guys, I need your help. Can someone make the two filter scripts from these two commands? Because I cant add them to my gamemode.

Quote:

if(strcmp(cmd, "/hitman", true) == 0 || strcmp(cmd, "/scigaj", true) == 0) {
if(strlen(cmd)>19) return SendClientMessage(playerid, CWARN, "Niepoprawna kwota!");
new tmp2[256];

tmp2 = strtok(cmdtext, idx);

if(!strlen(tmp2)) {
SendClientMessage2(playerid, CWARN, "Użyj: /scigaj [ID] [Kwota] [Powуd]");
return 1;
}
giveplayerid = strval(tmp2);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp2)) {
SendClientMessage2(playerid, CWARN, "Użyj: /scigaj [ID] [Kwota] [Powуd]");
return 1;
}

moneys = strval(tmp2);

if(moneys > GetPlayerMoney(playerid)) {
SendClientMessage2(playerid, CWARN, "Nie masz tyle kasy!");
return 1;
}

if(moneys > 250000) {
SendClientMessage2(playerid, CWARN, "Maksymalna kwota do wystawienia to: 250.000$ !");
return 1;
}

if(moneys < 1) {
SendClientMessage2(playerid, CWARN, "Kwota musi być większa od 1.");
return 1;
}
if(IsPlayerConnected(giveplayerid)==0) {
SendClientMessage2(playerid, CWARN, "Taki gracz nie jest podłączony.");
return 1;
}

bounty[giveplayerid]+=moneys;
GivePlayerMoney(playerid, 0-moneys);

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new powod[256];
powod = strrest(cmdtext, idx);

if(!strlen(powod)) {
SendClientMessage2(playerid, CWARN, "Zapomniałeś podać powуd poszukiwań! Użyj: /scigaj [ID] [Kwota] [Powуd]");
return 1;
}

if(strlen(powod)){
new string3[256];
format(string2, sizeof(string2), "%s jest poszukiwany/a! Kwota: $%d wyznaczona przez: %s (Całkowita nagroda: $%d).", giveplayer, moneys, sendername, bounty[giveplayerid]);
SendClientMessageToAll2(CINFO, string2);
format(string3, sizeof(string3), "Powуd: %s.", powod);
SendClientMessageToAll2(CINFO, string3);
format(string2, sizeof(string2), "Jestes poszukiwany/a! Kwota: $%d nagroda od %s (id: %d).", moneys, sendername, playerid);
SendClientMessage2(giveplayerid, CWARN, string2);
format(string3, sizeof(string3), "Powуd: %s.", powod);
SendClientMessage2(giveplayerid, CWARN, string3);
} else {
format(string2, sizeof(string2), "%s jest poszukiwany! Kwota: $%d wyznaczona przez: %s (Całkowita nagroda: $%d).", giveplayer, moneys, sendername, bounty[giveplayerid]);
SendClientMessageToAll2(CINFO, string2);
format(string2, sizeof(string2), "%s jest poszukiwany! Kwota: $%d wyznaczona przez: %s (Całkowita nagroda: $%d).", giveplayer, moneys, sendername, bounty[giveplayerid]);
print(string2);
format(string2, sizeof(string2), "Jestes poszukiwany! Kwota: $%d nagroda od %s (id: %d).", moneys, sendername, playerid);
SendClientMessage2(giveplayerid, CWARN, string2);
}

return 1

Quote:

if (strcmp(cmdtext, "/skok", true)==0)
{
DisMissDM;
new Float:X, Float:Y, Float:Z;
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if(IsPlayerInAnyVehicle(playerid)) {
new VehicleID;
RemovePlayerFromVehicle(playerid);
VehicleID = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid,X,Y,Z);
SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, 400);
LinkVehicleToInterior(VehicleID, 0);
SetCameraBehindPlayer(playerid);
} else {
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid, X + 0.01, Y + 0.01, 3000);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
GivePlayerWeapon(playerid, 46, 2);
return 1;
}

Reply
#2

Please guys I know its an easy one for you. Ill be grateful.
Reply
#3

Working on it
Reply
#4

Ehmm... really cant understand what cmd you are trying to convert in filterscript
Reply
#5

this one if(strcmp(cmd, "/hitman", true) == 0
and this if (strcmp(cmdtext, "/skok", true)==0)
Reply
#6

@KosmasRego

Are you able to make these filter scripts?
Reply
#7

Just add them to your GM under OnPlayerCommandText?

If you want to make a Filterscript you need to do the same but in a clean PWN file.

Or do you mean your using a differnt command system in your GM and you need to convert them before they will work properly with out interfeating with other commands in your GM?
Reply
#8

Quote:

Or do you mean your using a differnt command system in your GM and you need to convert them before they will work properly with out interfeating with other commands in your GM?

This.
Reply
#9

What command system are you using?
Reply
#10

@IceCube!

I'm using the Eclipse 4.8 gamemode, dont know the name of the command system.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)