17.04.2012, 18:15
Quote:
Hello, how can I do (using Incognito's streamer plugin) that a dynamic object will show in every interior, except for 0?
|
Код:
if(GetPlayerInterior(playerid) != 0) { // code here }
Hello, how can I do (using Incognito's streamer plugin) that a dynamic object will show in every interior, except for 0?
|
if(GetPlayerInterior(playerid) != 0) { // code here }
Bump.
EDIT: I could also use a good and efficient function for detecting if a player is paused. |
stock CreateNew%$%&%^$(name[],...)
{
return 1;
}
this page should sum it up for ya
https://sampforum.blast.hk/showthread.php?tid=315531 |
Quick n00b question.
I see that a lot of people use: Код:
if(IsPlayerConnected(targetid)){ //do something }else{ SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); } return 1; Код:
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); // do something here.. return 1; Is anything wrong with the second example? Does it affect teh performance in any way? I know is a noob question.. Just asking because I don't really know much stuff about how samp and NOT works in SAMP. |
I want to manipulate the text from OnPlayerText before sending it.
I know to use return 0 and format it instead that's not what I'm asking. What's the best way? It seems like using 'strins' on the parameter 'text' just doesn't work. All my commands stop working (weird). Also, should I do this: pawn Код:
|
Quick n00b question.
I see that a lot of people use: Код:
if(IsPlayerConnected(targetid)){ //do something }else{ SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); } return 1; Код:
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); // do something here.. return 1; Is anything wrong with the second example? Does it affect teh performance in any way? I know is a noob question.. Just asking because I don't really know much stuff about how samp and NOT works in SAMP. |
Quick n00b question.
I see that a lot of people use: Код:
if(IsPlayerConnected(targetid)){ //do something }else{ SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); } return 1; Код:
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Player not connected!"); // do something here.. return 1; Is anything wrong with the second example? Does it affect teh performance in any way? I know is a noob question.. Just asking because I don't really know much stuff about how samp and NOT works in SAMP. |
I'm just scripting a minigame, the one where in a grid of square objects a random object is deleted every now and then and players have to survive. (I think it's called "Don't Get Wet" so the general prefix is "DGW")
I'm concerned about how I select the random object, right now I have this code: pawn Код:
When there is only one object left, this code can take a lot of time and keep the server waiting sometimes, because it's random there's no knowing what object it might choose. For instance, for 1000 calls of that while loop the randomiser could always choose an invalid one and keep missing the one remaining block. I couldn't think of a better way (Probably because I woke up not long ago!) can anyone else? I'm sure there's a much better way to do this! |