Posts: 1,079
Threads: 64
Joined: Jan 2010
14.07.2010, 15:24
(
Последний раз редактировалось rbN.; 14.07.2010 в 15:38.
)
How do you block commands? Like I have a /jetpack command in my gamemode, but actually the system is in a filterscript. So how to to disable /jetpack without putting the filterscript into the gamemode?
Posts: 3,488
Threads: 16
Joined: Jun 2007
Reputation:
0
You can't put player back in vehicle in OnPlayerExitVehicle. Use a timer or do it under OnPlayerStateChange.
Posts: 1,079
Threads: 64
Joined: Jan 2010
@MadeMan Thanks. I realised like 30 seconds before you said that :P. I spawned a nrg --> exitted it --> I went back to my other vehicle
.
Anyways, thanks.
By the way, do you know how to block commands. Like I have a /jetpack command in my gamemode, but actually the system is in a filterscript. You know any way to disable /jetpack without putting the filterscript into gamemode?
Posts: 1,079
Threads: 64
Joined: Jan 2010
Quote:
Originally Posted by MadeMan
|
So how could I make
Код:
bool: Joined[MAX_PLAYERS],
into that?
Like
to the CallRemoteFunction?
I thought about
Код:
if(CallRemoteFunction("Joined[i]", "f", "true")) return SendClientMessage(playerid, COLOR_RED, "== You can't do this!");
but didn't had any success lol
Could you please do this one
?
Posts: 1,079
Threads: 64
Joined: Jan 2010
Quote:
Originally Posted by DJDhan
If you want to use "true" and "false", you can't do this:
Код:
if(CallRemoteFunction("Joined[i]", "f", "true")) return SendClientMessage(playerid, COLOR_RED, "== You Can't do this");
You need to use "s" for strings.
Then you need to use "strcmp" to compare the strings where you called the remote function from.
|
Yes sorry, but could you please do it for me? I'm a noob in scripting lol ^^.
Posts: 1,079
Threads: 64
Joined: Jan 2010
Quote:
Originally Posted by MadeMan
Function in gamemode
pawn Код:
public IsPlayerJoined(playerid) { if(Joined[playerid]) { return 1; } else { return 0; } }
call from filterscript
pawn Код:
if(CallRemoteFunction("IsPlayerJoined", "d", playerid)) return SendClientMessage(playerid, COLOR_RED, "== You Can't do this");
|
Woot, thanks.. LOVE YOU <3
D. not in gay way
Posts: 2,593
Threads: 34
Joined: Dec 2007
Or that way
pawn Код:
public IsPlayerJoined(playerid) return Joined[playerid] ? 1 : 0;
but simply
pawn Код:
public IsPlayerJoined(playerid) return Joined[playerid];