31.10.2009, 14:06
Okay guys, i made a minigame in my script, and it works fine. Also i disabled that people can teleport OUT of a minigame.
My question is: How can i make it, that people canґt teleport INTO the minigame.
Here are the scripts of the minigame and the punishment when try to teleport out.
This is the minigame
System knows now:
So it gives punishment when try to teleport:
So now you know all i wrote. How can i make it now, that i cannot teleport TO a player who is IN a minigame.
I hope you understand what i mean.
Jeffry
My question is: How can i make it, that people canґt teleport INTO the minigame.
Here are the scripts of the minigame and the punishment when try to teleport out.
This is the minigame
pawn Код:
if (strcmp("/rocket", cmdtext, true) == 0)
{
MinigameParticipant[playerid]=1; // let the system know that heґs in minigame
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid,100);
SendClientMessageToAll(0x828282FF, "Server: A player has joined the Rocket-Ramba-Zamba. Type /rocket to join as well!");
SendClientMessage(playerid, 0x007F00FF, "Have fun.");
SetPlayerPos(playerid, -1396.8975,1249.1334,1039.8672);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 16);
SaveToFile("RocketLog",string);
GivePlayerWeapon(playerid,35,10000);
return 1;
}
pawn Код:
MinigameParticipant[playerid]=1; // let the system know that heґs in minigame
pawn Код:
if(strcmp("/taxi 0", cmdtext, true) == 0)
if (MinigameParticipant[playerid]==1)
{new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateExplosion(x+random(5), y+random(5), z+random(5), 7, 10.0);
SendClientMessage(playerid,red,"Do NEVER teleport out of minigames!!!! Thats annoying!!!");
return 1;
(...)(my taxi location and some cash things...)
I hope you understand what i mean.
Jeffry