26.09.2009, 23:21
public OnPlayerCommandText(playerid, cmdtext[])
{
if(GetPlayerScore(playerid) >= 1) // if have a score then make command, when not a score then block the command and send a warning
{
if(strcmp(cmdtext, "/parkour2", true) == 0)
{
ParkourCP[playerid] = 0;
SetPlayerMapIcon(playerid, MAP_ICON_ID, ParkourCheckpoints[0][0], ParkourCheckpoints[0][1], ParkourCheckpoints[0][2], 53, 0);
SetPlayerPos(playerid, 1847.0726,-1593.7416,15.4674);
SetPlayerFacingAngle(playerid, 175.9439);
SetCameraBehindPlayer(playerid);
SetPlayerHealth(playerid, 97.6);
return 1;
}
else
{
SendClientMessage(playerid,rot,"You must complete parkour 1. (/start)"); //message when you not have a scorepoint
}
return SendClientMessage(playerid,rot,"You must have a score of more than 1");
}
return 1;
}
{
if(GetPlayerScore(playerid) >= 1) // if have a score then make command, when not a score then block the command and send a warning
{
if(strcmp(cmdtext, "/parkour2", true) == 0)
{
ParkourCP[playerid] = 0;
SetPlayerMapIcon(playerid, MAP_ICON_ID, ParkourCheckpoints[0][0], ParkourCheckpoints[0][1], ParkourCheckpoints[0][2], 53, 0);
SetPlayerPos(playerid, 1847.0726,-1593.7416,15.4674);
SetPlayerFacingAngle(playerid, 175.9439);
SetCameraBehindPlayer(playerid);
SetPlayerHealth(playerid, 97.6);
return 1;
}
else
{
SendClientMessage(playerid,rot,"You must complete parkour 1. (/start)"); //message when you not have a scorepoint
}
return SendClientMessage(playerid,rot,"You must have a score of more than 1");
}
return 1;
}