23.08.2010, 23:50
(
Последний раз редактировалось Cameltoe; 24.08.2010 в 00:08.
)
- Pickup's
Good evening everyone, im trying to make an /enter command with pickup's fetched from a database.
Here's the command itself:
When typing over an pickup it works, but if player isn't in range the it return's unknown cmd.
this is highly needed as i don't want to make two commands to enter /enter and /housenter would be messy.
thanks all
Iv'e tested with prints to see if everything gets fetched to the vars and it does..
Good evening everyone, im trying to make an /enter command with pickup's fetched from a database.
Here's the command itself:
pawn Код:
dcmd_enter(playerid,params[])
{
#pragma unused params
for(new i; i < MAX_PICKUPS; i++)
{
player[playerid][Entered] = 0;
if(PlayerToPoint(playerid, 3,Pickups[i][uX],Pickups[i][uY],Pickups[i][uZ]))
{
SetPlayerInterior(playerid, Pickups[i][uInt]);
SetPlayerVirtualWorld(playerid,Pickups[i][uWorldid]);
SetPlayerPos(playerid, Pickups[i][uEx], Pickups[i][uEy], Pickups[i][uEz]);
player[playerid][Entered] = i;
printf("return 1");
}
}
if(player[playerid][Entered] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "( ! ) You have to be near an building to enter it.");
}
else return 1;
return 1;
}
this is highly needed as i don't want to make two commands to enter /enter and /housenter would be messy.
thanks all

Iv'e tested with prints to see if everything gets fetched to the vars and it does..