21.02.2012, 17:39
pawn Код:
new BoxObj[MAX_PLAYERS];
dcmd_vbox(playerid, params[])
{
#pragma unused params
if (Vip[playerid] < 1 ) {
SendClientMessage(playerid, COLOR_CERVENA, " [!] Only Vips can do that !");
}
else {
if (Vip[playerid] >= 1) {
if (vbox[playerid] == 1) {
SendClientMessage(playerid, COLOR_CERVENA, " You can not spawn two boxes !");
}
if (vbox[playerid] == 0) {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
DestroyObject(BoxObj[playerid]);
BoxObj[playerid] = CreateObject(1685, x, y+2.0, z, 0.0, 0.0,0.0);
vbox[playerid] = 1;
}
}
}
return 1;
}
dcmd_vrbox(playerid, params[])
{
#pragma unused params
if (Vip[playerid] < 1 ) {
SendClientMessage(playerid, COLOR_CERVENA, " [!] Only Vips can do that !");
}
else {
if (Vip[playerid] >= 1) {
if (vbox[playerid] == 0) {
SendClientMessage(playerid, COLOR_CERVENA, "You must spawn a box first to remove it !");
}
if (vbox[playerid] == 1) {
new Float:x, Float:y, Float:z;
GetPlayerObjectPos(playerid, 1685, Float:x, Float:y, Float:z);
DestroyObject(BoxObj[playerid]);
vbox[playerid] = 0;
}
}
}
return 1;
}