SA-MP Forums Archive
Just something I Cant Pick out - 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: Just something I Cant Pick out (/showthread.php?tid=214860)



Just something I Cant Pick out - Matthew_Johnston - 22.01.2011

heyo people Im getting these Two errors:
Код:
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP10.pwn(329) : error 035: argument type mismatch (argument 1)
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP10.pwn(329) : error 035: argument type mismatch (argument 1)
For this Script ---
Код:
		                              if(strcmp(cmdtext, "/fishing", true) == 0)
	                              {
	 		   if(IsPlayerInRangeOfPoint(playerid, 6, 2359.5322,526.1093,1.7969))
   					{
						  new str[128];
						  new rand = random(sizeof(fish)); 
                          GetPlayerName(playerid, str, sizeof(str));
				          format(sizeof(str), sizeof(fish), "%s Has Caught a %s", string, string);
						 SendClientMessageToAll(0xFFFFFFAA, str);
	 				}
		return 1;
	}
And Please Comment if you need the array to work with


Re: Just something I Cant Pick out - HyperZ - 22.01.2011

pawn Код:
if(strcmp(cmdtext, "/fishing", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 6, 2359.5322,526.1093,1.7969))
        {
        new str[128];
        new rand = random(sizeof(str));
        GetPlayerName(playerid, str, sizeof(str));
        format(str,sizeof(str),"%s Has Caught a %s",str,str);
        SendClientMessageToAll(0xFFFFFFAA, str);
        }
        return 1;
    }



Re: Just something I Cant Pick out - Lorenc_ - 22.01.2011

Quote:
Originally Posted by Clive
Посмотреть сообщение
pawn Код:
if(strcmp(cmdtext, "/fishing", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 6, 2359.5322,526.1093,1.7969))
        {
        new str[128];
        new rand = random(sizeof(str));
        GetPlayerName(playerid, str, sizeof(str));
        format(str,sizeof(str),"%s Has Caught a %s",str,str);
        SendClientMessageToAll(0xFFFFFFAA, str);
        }
        return 1;
    }
lol its going to say "Player has caught a Player".

format(str,sizeof(str),"%s Has Caught a %d",str,rand);

try that.

It'll pick a random value between 0-128..


Re: Just something I Cant Pick out - HyperZ - 22.01.2011

pawn Код:
if(strcmp(cmdtext, "/fishing", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 6, 2359.5322,526.1093,1.7969))
        {
            new str[128], PlayerName[MAX_PLAYER_NAME];
            new rand = random(sizeof(fish));
            GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
            format(str,sizeof(str),"%s Has Caught a %s",PlayerName,rand);
            SendClientMessageToAll(0xFFFFFFAA, str);
        }
        return 1;
    }
Edit: i rly don't understand.


Re: Just something I Cant Pick out - Lorenc_ - 22.01.2011

^ i just done that.. lol ..


Re: Just something I Cant Pick out - Matthew_Johnston - 22.01.2011

Guys I made an Array of Fish, And I Need it to Say Player has Caught (( Random From the Array ))