06.11.2010, 05:32
This Doesn't Work Either. Now anybody can do it.
pawn Код:
if(strcmp("/lock", cmdtext, true, 5) == 0) {
new hid = 0;
while(hid < MAX_HOUSES) {
if(IsPlayerInRangeOfPoint(playerid, 5, hPickupX[hid], hPickupY[hid], hPickupZ[hid]) == 1) {
if(!strcmp(pName[playerid], hOwner[hid], true)) {
hLock[hid] = 1;
SendClientMessage(playerid, yellow, "Your House Was Locked");
}
else SendClientMessage(playerid, yellow, "You Can't Lock This House");
break;
}
hid++;
}
return 1;
}
if(strcmp("/unlock", cmdtext, true, 7) == 0) {
new hid = 0;
while(hid < MAX_HOUSES) {
if(IsPlayerInRangeOfPoint(playerid, 5, hPickupX[hid], hPickupY[hid], hPickupZ[hid]) == 1) {
if(!strcmp(pName[playerid], hOwner[hid], true)) {
hLock[hid] = 0;
SendClientMessage(playerid, yellow, "Your House Was Unlocked");
}
else SendClientMessage(playerid, yellow, "You Can't Unlock This House");
break;
}
hid++;
}
return 1;
}