SA-MP Forums Archive
I need help, please!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help, please!! (/showthread.php?tid=99610)

Pages: 1 2


I need help, please!! - Pinehole - 28.09.2009

Ok i have been compiling alot then today the Compile screen will pop-up and say "Unable to Execute Compile..". it's pissin me off, is there a program i need to download to stop it? please help me someone


Re: I need help, please!! - wil721vi - 28.09.2009

Can you please copy and paste the whole box? i may be able to help, this happens to me alot


Re: I need help, please!! - [HKS]dlegend - 28.09.2009

probley because u have to many problems on ur script


Re: I need help, please!! - ded - 28.09.2009

Sometimes if you have moved the .pwn file whilst PAWNO was open and the script still open it will say that. Try copying the whole script closing PAWNO then re-opening PAWNO .. clicking new, and pasting all the script in and compile.


Re: I need help, please!! - Pinehole - 28.09.2009

Nvm i got it working again, i just needed to open the file from Pawno.exe, thanks anyways.


Re: I need help, please!! - Pinehole - 28.09.2009

I have another question, like on RP scripts the person needs to be next to someone to see what they are saying, how do i make it like that?


Re: I need help, please!! - wil721vi - 28.09.2009

Well, you have to set the distance that a person can hear someone. Are you a begginer scripter?



Re: I need help, please!! - Pinehole - 28.09.2009

Yes i kinda am, but can you give me an example please of the distance?


Re: I need help, please!! - Hiitch - 28.09.2009

Quote:
Originally Posted by Pinehole
Yes i kinda am, but can you give me an example please of the distance?
Look up ProxDetector and use that, it's very good for RP gamemodes.


Re: I need help, please!! - ded - 28.09.2009

Please don't double post. The Modify button is there for a reason. Also if you want help with that please search there are plenty of posts with the answer you're looking for.


Re: I need help, please!! - Pinehole - 29.09.2009

The thing is, the posts are not helping me.


Re: I need help, please!! - ded - 29.09.2009

Why not, there's hundreds of these kind of posts that have been solved ..


Re: I need help, please!! - Pinehole - 29.09.2009

Nvm i solved it, i want to have a floating "i" beside ammunation, how can i do that?


Re: I need help, please!! - Correlli - 29.09.2009

Quote:
Originally Posted by Pinehole
Nvm i solved it, i want to have a floating "i" beside ammunation, how can i do that?
You mean a pickup?
https://sampwiki.blast.hk/wiki/AddStaticPickup
https://sampwiki.blast.hk/wiki/CreatePickup


Re: I need help, please!! - Pinehole - 29.09.2009

Thanks, but i'm trying to just make an "i" float by ammunation, with no effect.


Re: I need help, please!! - Correlli - 29.09.2009

Quote:
Originally Posted by Pinehole
Thanks, but i'm trying to just make an "i" float by ammunation, with no effect.
Show us your code.


Re: I need help, please!! - Pinehole - 29.09.2009

I have this filterscript

Код:
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GREEN 0xDC143C
#define COLOR_RED1 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA

#define TEAM_GUNDEALER 2

#pragma unused ret_memcpy

static gTeam[MAX_PLAYERS]; 


forward Float:GetDistanceBetweenPlayers(p1,p2);

public OnPlayerCommandText(playerid, cmdtext[])
{
  			new tmp[256];
				new string[256];
				new sendername[MAX_PLAYER_NAME];
				new giveplayer[MAX_PLAYER_NAME];
				new cmd[256];
 				new idx;
  			new giveplayerid;
				cmd = strtok(cmdtext, idx);

				if(strcmp(cmd, "/gundealer", true) == 0) {
	   	  if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,1366.4325,-1275.2096,13.5469))
	gTeam[playerid] = TEAM_GUNDEALER;
  	SendClientMessage(playerid, COLOR_YELLOW, "Make Sure you are near Ammunation Door, to become an Arms Dealer");
  SendClientMessage(playerid, COLOR_YELLOW, "");
	return 1;
	}

				if(strcmp(cmd, "/sellmolotov", true) == 0) {

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            		SendClientMessage(playerid, COLOR_YELLOW, "Usage: /sellgunm4");
								return 1;
        }
				giveplayerid = strval(tmp);

  			if (IsPlayerConnected(giveplayerid)) {
    if (gTeam[playerid] == TEAM_GUNDEALER) {
  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  GetPlayerName(playerid, sendername, sizeof(sendername));
  GivePlayerWeapon(giveplayerid, 18, 5);
  GivePlayerMoney(playerid, 2000);
  GivePlayerMoney(giveplayerid, -2000);
  format(string, sizeof(string), "You have sold 5 molotovs", sendername, playerid);
  SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  format(string, sizeof(string), "%s gave you 5 molotovs", giveplayer, giveplayerid, sendername, playerid);
  return 1;
      }else{
        				SendClientMessage(playerid, COLOR_RED1, "You Are not official Gundealer.");
}
            }else{
    format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
		SendClientMessage(playerid, COLOR_YELLOW, string);
}
				return 1;
}


				if(strcmp(cmd, "/sellgunmp5", true) == 0) {

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            		SendClientMessage(playerid, COLOR_YELLOW, "Usage: /sellmp5 [id]");
								return 1;
        }
				giveplayerid = strval(tmp);

  			if (IsPlayerConnected(giveplayerid)) {
    if (gTeam[playerid] == TEAM_GUNDEALER) {
  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  GetPlayerName(playerid, sendername, sizeof(sendername));
  GivePlayerWeapon(giveplayerid, 29, 65000);
  GivePlayerMoney(playerid, 3000);
  GivePlayerMoney(giveplayerid, -3000);
  format(string, sizeof(string), "You have sold an Mp5 to %s", sendername, playerid);
  SendClientMessage(giveplayerid, COLOR_GREY, string);
  format(string, sizeof(string), "%s Has Sold you an Mp5", sendername, playerid, sendername, playerid);
  return 1;
      }else{
        				SendClientMessage(playerid, COLOR_RED1, "You Are not official Gundealer.");
}
            }else{
    format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
		SendClientMessage(playerid, COLOR_YELLOW, string);
}
				return 1;
}


				if(strcmp(cmd, "/sellgunspas12", true) == 0) {

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            		SendClientMessage(playerid, COLOR_YELLOW, "Usage: /sellspas12 [ID]");
								return 1;
        }
				giveplayerid = strval(tmp);

  			if (IsPlayerConnected(giveplayerid)) {
    if (gTeam[playerid] == TEAM_GUNDEALER) {
  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  GetPlayerName(playerid, sendername, sizeof(sendername));
  GivePlayerWeapon(giveplayerid, 27, 65000);
  GivePlayerMoney(playerid, 1000);
  GivePlayerMoney(giveplayerid, -1000);
  format(string, sizeof(string), "You have sold an Spas12 to %s", sendername, playerid);
  SendClientMessage(giveplayerid, COLOR_GREY, string);
  format(string, sizeof(string), "%s Has sold you an Spas12", giveplayer, giveplayerid, sendername, playerid);
  return 1;
      }else{
        				SendClientMessage(playerid, COLOR_RED1, "You arent a Gundealer.");
}
            }else{
    format(string, sizeof(string), "id %d is not connected.", giveplayerid);
		SendClientMessage(playerid, COLOR_YELLOW, string);
}
				return 1;
}

        return 0;
}
public Float:GetDistanceBetweenPlayers(p1,p2){
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));

}



Re: I need help, please!! - Correlli - 29.09.2009

Quote:
Originally Posted by Pinehole
with no effect.
I mean the pickup code you tried to add.


Re: I need help, please!! - Pinehole - 29.09.2009

I never tried to add any pick up code, all i want to do is have a floating "i" beside ammunation, cause in order to become a gundealer you have to be there


Re: I need help, please!! - Correlli - 29.09.2009

As i posted:
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Pinehole
Nvm i solved it, i want to have a floating "i" beside ammunation, how can i do that?
You mean a pickup?
https://sampwiki.blast.hk/wiki/AddStaticPickup
https://sampwiki.blast.hk/wiki/CreatePickup