SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   General (https://forum.sa-mp.com/forumdisplay.php?f=13)
-   -   Suggestions For Future Sa:MP Versions. (https://forum.sa-mp.com/showthread.php?t=102997)

Sergei 31/03/2010 04:47 PM

Re: Suggestions For Future Sa:MP Versions.
 
Code:

ShowPlayerMouse(playerid, bool:toggle)
IsPlayerMouseShown(playerid)
GetPlayerMousePos(playerid, &Float:x, &Float:x)
OnPlayerMouseClick(playerid, Float:x, Float:y)


Luka P. 31/03/2010 05:23 PM

Re: Suggestions For Future Sa:MP Versions.
 
Synced games at 24/7, bars etc.
  • IsPlayerInGame(playerid) -If player plays a game it returns true, else it returns false
  • GetPlayerGame(playerid,&game) -Detect which game is player playing
  • SetPlayerGame(playerid,game) -Change player's game
  • TogglePlayerGames(playerid,bool:enabled) -Enable/disable games, like EnableStuntBonusForPlayer, but for games

Blantas 31/03/2010 05:35 PM

Re: Suggestions For Future Sa:MP Versions.
 
Quote:

Originally Posted by $ЯĢ
Code:

OnPlayerMouseClick(playerid, Float:x, Float:y)

I think this isn't really needed. We could do:

Code:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if (PRESSED(KEY_FIRE) & IsPlayerMouseShown(playerid))
        {
                new Float:pos[2];
                GetPlayerMousePos(playerid, pos[0], pos[1]);
                OnPlayerMouseClick(playerid, pos[0], pos[1]);
        }
        return 1;
}
forward OnPlayerMouseClick(playerid, Float:x, Float:y);
public OnPlayerMouseClick(playerid, Float:x, Float:y)
{
        //Code goes here
        return 1;
}


RSX 31/03/2010 05:48 PM

Re: Suggestions For Future Sa:MP Versions.
 
In addiction to all screen X;Y's - ofcourse we will need simple functions:
Code:

GetMaxX(playerid); - Max X as return
GetMaxY(playerid); - Max Y as return


Correlli 31/03/2010 05:56 PM

Re: Suggestions For Future Sa:MP Versions.
 
TogglePlayerRadar(playerid, toggle);

Sergei 31/03/2010 06:05 PM

Re: Suggestions For Future Sa:MP Versions.
 
Quote:

Originally Posted by Don Correlli
TogglePlayerRadar(playerid, toggle);

Quote:

Originally Posted by $€ЯĢ
Code:

SetPlayerHud(playerid, statcode, bool:toggle)
Enable/disable any hud element (minimap, weapon icon, weapon ammo, money bar, health bar, armour bar, clock, etc); TogglePlayerClock could be removed because this SetPlayerHud would also cover it.


Quote:

Originally Posted by Blantas >:v
Quote:

Originally Posted by $�#1071;Ģ
Code:

OnPlayerMouseClick(playerid, Float:x, Float:y)

I think this isn't really needed. We could do:

Code:

...

And no. That callback is needed because of various reasons.

Joe Staff 31/03/2010 06:27 PM

Re: Suggestions For Future Sa:MP Versions.
 
Like the fact that OnPlayerKeyStateChange isn't called when the mouse is showing (so far anyway)

Jakku 31/03/2010 07:19 PM

Re: Suggestions For Future Sa:MP Versions.
 
This would be useful:

pawn Code:
public OnPlayerBuyFood(playerid, restaurantid,foodid)
{
}


Dreftas 31/03/2010 07:20 PM

Re: Suggestions For Future Sa:MP Versions.
 
Quote:

Originally Posted by Jakku
This would be useful:

pawn Code:
public OnPlayerBuyFood(playerid, restaurantid,foodid)
{
}


Better:
pawn Code:
public OnPlayerBuyFood(playerid, restaurantid, foodid, cost)
Of course, if Food ID have it's special price then "cost" isn't needed.

Torran 31/03/2010 09:08 PM

Re: Suggestions For Future Sa:MP Versions.
 
Quote:

Originally Posted by Dreft
Quote:

Originally Posted by Jakku
This would be useful:

pawn Code:
public OnPlayerBuyFood(playerid, restaurantid,foodid)
{
}


Better:
pawn Code:
public OnPlayerBuyFood(playerid, restaurantid, foodid, cost)
Of course, if Food ID have it's special price then "cost" isn't needed.

There would be no need for cost,
As he means it as food from burger shot ect


All times are GMT. The time now is 03:59 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.