rendered paste body/*
-----------------------------------------------
|\ | /\ | |
| \ | / \ | |
| \ | / \ | |
| \ | / \ | |
| \ | /--------\ | |
| \ | / \ | |
| \| / \ _|_ |________
-----------------------------------------------*/
#include <a_samp>
#define FILTERSCRIPT
#pragma tabsize 0
#define COLOR_RED 0xAA3333AA
#define TEAM_COP
new gTeam[MAX_PLAYERS];
new nail;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" NailMat xD");
print("--------------------------------------\n");
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
TogglePlayerControllable(playerid, 0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/lnail", true) == 0) {
}
if(gTeam[playerid] == TEAM_COP)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
nail = CreateObject(2892, X,Y,Z,0,0,0);
SetPlayerCheckpoint(playerid, X,Y,Z,5.0);
}
else
{
SendClientMessage(playerid, COLOR_RED,"You Are NOT A COP!");
}
//Pick up nail
if(strcmp(cmdtext, "/pnail", true) == 0) {
}
if(gTeam[playerid] == TEAM_COP)
{
DisablePlayerCheckpoint(playerid);
DestroyObject(nail);
}
else
{
SendClientMessage(playerid, COLOR_RED,"You Are NOT A COP!");
}
return 1;
}