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;
}
MinigameParticipant[playerid]=1; // let the system know that heґs in minigame
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...)
Originally Posted by Mo3
Just change the return 1; to return 0;.
|
if (strcmp("/rocket", cmdtext, true) == 0)
{
if(MinigameParticipant[playerid]!=1)
{
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);
}
if(MinigameParticipant[playerid]==1)
{
SendClientMessage(playerid, COLOR_RED, "You suck XD");
}
return 1;
}
dcmd_tp(playerid,params[]) {
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!!!");
}
else
{
if(100000 < GetPlayerMoney(playerid)) {
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /tp [playerid]");
new player1, string[128];
if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
CMDMessageToAdmins(playerid,"TP");
new Float:x, Float:y, Float:z; GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(player1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
if(GetPlayerState(playerid) == 2) {
SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z); LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
GivePlayerMoney(playerid, -100000);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
} else SetPlayerPos(playerid,x+2,y,z);
GivePlayerMoney(playerid, -100000);
format(string,sizeof(string),"You have teleported to \"%s\"", pName(player1));
return SendClientMessage(playerid,blue,string);
} else return SendClientMessage(playerid, red, "Player is not connected or is yourself");
} else return SendClientMessage(playerid,red,"Sorry, you donґt have enaugh money to teleport. You need 100 000$ to teleport.");
}
return 1;}
if(MinigameParticipant[player1]==1)
{
SendClientMessage(playerid, COLOR_RED, "The Player you want to teleport to is currently in a minigame. Pls Try again Later.");
}
C:\Users\Patrick und Marco\Desktop\Pawn - Kopie (3)\filterscripts\ladmin4v2.pwn(1141) : error 017: undefined symbol "player1"
1 Error.