21.02.2012, 16:16
Hey , i maked /vbox command using dudb :
and a command to remove it :
the problem is with /vrbox command , whene i type it it doesn't remove the box....
i hope you help me to fix this problem , Thanks.
pawn Код:
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);
CreateObject(1685, x, y+2.0, z, 0.0, 0.0,0.0);
vbox[playerid] = 1;
}
}
}
return 1;
}
pawn Код:
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(1685);
vbox[playerid] = 0;
}
}
}
return 1;
}
i hope you help me to fix this problem , Thanks.