public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == HealthPickup) {
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid) { if( pickupid == HealthPickup) { if(IsPlayerAdmin(playerid)) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!"); } else return SendClientMessage(playerid, COLOR_ORANGERED, "YOu're an admin"); } return 1; }
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == HealthPickup && IsPlayerAdmin(playerid))
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
}
return 1;
}
Here:
pawn Код:
|
Originally Posted by [FU]Victious I hope you're not gay. |
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_CRIMSON 0xDC143CAA
//Checkpoints
new EnterHouse, LeaveHouse;
public OnFilterScriptInit()
{
print("\n-----------------------------------------");
print(" Checkpoints By Larsey123");
print("-------------------------------------------\n");
//Checkpoints
EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
LeaveHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == EnterHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
SetPlayerInterior(playerid, 3 );
SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
}
if( pickupid == LeaveHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
SetPlayerInterior(playerid, 0 );
SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
}
return 1;
}
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_CRIMSON 0xDC143CAA
//Checkpoints
new EnterHouse, LeaveHouse;
public OnFilterScriptInit()
{
print("\n-----------------------------------------");
print(" Checkpoints By Larsey123");
print("-------------------------------------------\n");
//Checkpoints
EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
LeaveHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == EnterHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
SetPlayerInterior(playerid, 3 );
SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
}
else
{
GameTextForPlayer(playerid,"~r~YOU CANNOT ENTER.",4000,6);
}
if( pickupid == LeaveHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
SetPlayerInterior(playerid, 0 );
SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
}
return 1;
}
And it works, but i want it to say this "You cannot enter, Just for admins" when an non-admin try to enter. |
#include <a_samp> #define FILTERSCRIPT #define COLOR_CRIMSON 0xDC143CAA //Checkpoints new EnterHouse, LeaveHouse; public OnFilterScriptInit() { print("\n-----------------------------------------"); print(" Checkpoints By Larsey123"); print("-------------------------------------------\n"); //Checkpoints EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125); LeaveHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if( pickupid == EnterHouse && IsPlayerAdmin(playerid)) { SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572); SetPlayerInterior(playerid, 3 ); SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!"); } else { SendClientMessage(playerid,COLOR_CRIMSON,"This house is for admins only ... (you are not admin!)"); } if( pickupid == LeaveHouse && IsPlayerAdmin(playerid)) { SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203); SetPlayerInterior(playerid, 0 ); SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!"); } return 1; }
#include <a_samp> #define FILTERSCRIPT #define COLOR_GREY 0xAFAFAFAA #define COLOR_CRIMSON 0xDC143CAA //Checkpoints new EnterHouse, LeaveHouse; public OnFilterScriptInit() { print("\n-----------------------------------------"); print(" Checkpoints By Larsey123"); print("-------------------------------------------\n"); //Checkpoints EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125); LeaveHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if( pickupid == EnterHouse && IsPlayerAdmin(playerid)) { SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572); SetPlayerInterior(playerid, 3 ); SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!"); } if( pickupid == LeaveHouse && IsPlayerAdmin(playerid)) { SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203); SetPlayerInterior(playerid, 0 ); SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!"); } else { SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !"); } return 1; }
Maybe lrn2readpreviousposts? Thanks. |
pawn Код:
|
!IsPlayerAdmin(playerid))
public OnPlayerPickUpPickup(playerid, pickupid) { if( pickupid == HealthPickup) { if(IsPlayerAdmin(playerid)) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!"); } else return SendClientMessage(playerid, COLOR_ORANGERED, "YOu're an admin"); } return 1; }
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_CRIMSON 0xDC143CAA
//Checkpoints
new EnterHouse, LeaveHouse;
public OnFilterScriptInit()
{
print("\n-----------------------------------------");
print(" Checkpoints By Larsey123");
print("-------------------------------------------\n");
//Checkpoints
EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
LeaveHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == EnterHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
SetPlayerInterior(playerid, 3 );
SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
}
else
{
GameTextForPlayer(playerid,"~r~YOU CANNOT ENTER.",4000,6);
}
if( pickupid == LeaveHouse && IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
SetPlayerInterior(playerid, 0 );
SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
}
return 1;
}
If it is so easy then fix this how i want it!
pawn Код:
|