Just something I Cant Pick out
#1

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
Reply
#2

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;
    }
Reply
#3

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..
Reply
#4

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.
Reply
#5

^ i just done that.. lol ..
Reply
#6

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


Forum Jump:


Users browsing this thread: 3 Guest(s)