pawn Код:
CMD:giveplayerrights(playerid, params[])
{
new targetid, level;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0000000, "You can't use this command.");
if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, 0xFFFFFF, "USAGE: /giveplayerrights [playerid] [rights level]");
SendClientMessage(playerid, 0x0000000, "You has gived him rights.");
IsPlayerVip[targetid] = level;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
return 1;
}
if(strcmp("/nrg", cmdtext, true, 10) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
CreateVehicle(522, x, y ,z, 10, 0, 0, 20);
return 1;
}
if(strcmp("/vipopen1", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, -2811.1684570313,-1524.8093261719,142.4806060791))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0000000, "You cant open admin gate.");
MoveObject(vrata,-2811.1684570313,-1524.8093261719,142.4806060791, 2.0);
return 1;
}
else
{
SendClientMessage(playerid, 0x0000000, "You are not close enought to open the gate.");
return 1;
}
}
if(strcmp("/vipclose1", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, -2811.1684570313,-1524.8093261719,142.4806060791))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0000000, "You cant open admin gate.");
MoveObject(vrata,-2810.94750977,-1523.27453613,142.48060608, 2.0);
return 1;
}
else
{
SendClientMessage(playerid, 0x0000000, "You are not close enought to close the gate.");
return 1;
}
}
if(strcmp("/viptele", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, -2810.94750977,-1523.27453613,142.48060608);
return 1;
}
if(strcmp("/viphelp", cmdtext, true, 10) == 0)
{
if(IsPlayerVip[playerid] == 1)
{
SendClientMessage(playerid, 0x0000000, "/vipguns, /vippacket");
return 1;
}
if(IsPlayerVip[playerid] == 2)
{
SendClientMessage(playerid, 0x0000000, "/viphouse, /vipopen1, /vipclose1");
return 1;
}
else
{
SendClientMessage(playerid, 0x0000000, "You are not vip.");
return 1;
}
}
if(strcmp("/vipguns", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, vipguns, DIALOG_STYLE_MSGBOX, "Vip Guns", "Shawn-off\nTec9", "Accept", "Cancel");
return 1;
}
return SendClientMessage(playerid, 0x0000000, "This command does not exist please try again or something else!");
}
so what i need to do now cause i dont understand much english..