COMMAND:jail(playerid, params[])
{
new id;
if(PlayerInfo[playerid][Admin] == 0)return SendClientMessage(playerid, 0xFF0000FF, "Only admin 1 can use this command!!");
if(sscanf(params,"u", id))return SendClientMessage(playerid, 0x33CCFFAA, "Usage: /jail [id]");
if(IsPlayerConnected(id))
if(Jail[id] == 1) return SendClientMessage(playerid,red,"That Player is already in jail!");
if(PlayerInfo[id][Admin] >= 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(String, sizeof(String), "%s has jailed you",Name);
SendClientMessage(id,green, String);
Jail[id] = 1;
ResetPlayerWeapons(id);
SetPlayerPos(id, 412.99816894531,2543.0656738281,26.244613647461);
format(String, sizeof(String), "You have jailed %s",Name);
SendClientMessage(playerid,green, String);
}
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,"Player is not connected");
if(PlayerInfo[id][Admin] >= 1)
if(PlayerInfo[playerid][Admin] >= 1)
Try :
pawn Код:
pawn Код:
pawn Код:
|
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,30,200); //AK-47
SetPlayerTeam(playerid, 0);
SetPlayerColor(playerid, COLOR_RED);
FSave[playerid] = SetTimerEx("Save",1000,true,"i",playerid);//This creates a timer when the player spawns and it saves the file ever 1 second.
if(Member[playerid] == 1)
{
SetPlayerColor(playerid,COLOR_GREY);
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 255);
SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27,100); //Combat Shotgun
GivePlayerWeapon(playerid,30,200); //AK-47
SendClientMessage(playerid,COLOR_GREY,"Combat Team: Airwolves.");
}
if(Member[playerid] == 2)
{
SetPlayerColor(playerid,COLOR_DBLUE);
SetPlayerTeam(playerid, 2);
SetPlayerSkin(playerid, 255);
SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27,100); //Combat Shotgun
GivePlayerWeapon(playerid,30,200); //AK-47
SendClientMessage(playerid,COLOR_DBLUE,"Combat Team: Bluefoxes.");
}
if(Member[playerid] == 3)
{
SetPlayerColor(playerid,COLOR_YELLOW);
SetPlayerTeam(playerid, 3);
SetPlayerSkin(playerid, 255);
SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27,100); //Combat Shotgun
GivePlayerWeapon(playerid,30,200); //AK-47
SendClientMessage(playerid,COLOR_YELLOW,"Combat Team: Thunderbirds.");
}
if(Leader[playerid] == 1)
{
SetPlayerColor(playerid,COLOR_GREY);
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 61);
SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
GivePlayerWeapon(playerid, 38, 100); //Minigun
GivePlayerWeapon(playerid, 30, 350); //AK-47
/*SendClientMessage(playerid,COLOR_GREY,"Combat Team: Airwolves.");*/
}
if(Leader[playerid] == 2)
{
SetPlayerColor(playerid,COLOR_DBLUE);
SetPlayerTeam(playerid, 2);
SetPlayerSkin(playerid, 61);
SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
GivePlayerWeapon(playerid, 38, 100); //Minigun
GivePlayerWeapon(playerid, 30, 350); //AK-47
/*SendClientMessage(playerid,COLOR_DBLUE,"Combat Team: Bluefoxes.");*/
}
if(Leader[playerid] == 3)
{
SetPlayerColor(playerid,COLOR_YELLOW);
SetPlayerTeam(playerid, 3);
SetPlayerSkin(playerid, 61);
SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
GivePlayerWeapon(playerid, 38, 100); //Minigun
GivePlayerWeapon(playerid, 30, 350); //AK-47
/*SendClientMessage(playerid,COLOR_YELLOW,"Combat Team: Thunderbirds.");*/
}
new id;
if(Jail[id] == 1) //if player is jailed or not
{
SetPlayerPos(playerid, 412.99816894531,2543.0656738281,26.244613647461);
SendClientMessage(playerid,COLOR_GREEN,"Welcome Back In Jail!.");
}
return 1;
}
if(Jail[playerid] == 1) //if player is jailed or not
{
SetPlayerPos(playerid, 412.99816894531,2543.0656738281,26.244613647461);
SendClientMessage(playerid,COLOR_GREEN,"Welcome Back In Jail!.");
}
pawn Код:
|
if(Jail[playerid] == 1)