04.07.2011, 16:51
(
Последний раз редактировалось Gomma; 04.07.2011 в 17:53.
)
Hello,
I created a little Bizz & House System for my server. Everything is working fine but this part. I wrote this under OnPlayerPickupPickup, but it doesn't seem to work:
# The variables BizzInfo and HouseInfo are defined at a other part of the script. Don't worry about them.
So I don't really know how to do this or what is wrong with the code.
Anyway, thanks in advance
I created a little Bizz & House System for my server. Everything is working fine but this part. I wrote this under OnPlayerPickupPickup, but it doesn't seem to work:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new bid = 0; bid < sizeof(BizzInfo) ; bid++)
{
if(pickupid == BizzInfo[bid][BPick])
{
new string[164];
if(BizzInfo[bid][HasOwner] == 0)
{
format(string,sizeof(string),"~w~Name: ~y~%s~n~~w~Besitzer: ~g~Keiner~n~~r~/bizzinfo",BizzInfo[bid][Name]);
GameTextForPlayer(playerid,string,2500,3);
}
else if(BizzInfo[bid][HasOwner] == 1)
{
format(string,sizeof(string),"~w~Name: ~y~%s~n~~w~Besitzer: ~g~%s~n~~r~/bizzinfo",BizzInfo[bid][Name],BizzInfo[bid][Owner]);
GameTextForPlayer(playerid,string,2500,3);
}
}
}
for(new hid = 0; hid < sizeof(HouseInfo) ; hid++)
{
if(pickupid == HouseInfo[hid][HPick])
{
new string[164];
if(HouseInfo[hid][HasOwner] == 0)
{
format(string,sizeof(string),"~w~Besitzer: ~g~Keiner~n~~y~ID: %d~n~~r~/hausinfo",HouseInfo[hid][ID]);
GameTextForPlayer(playerid,string,2500,3);
}
else if(HouseInfo[hid][HasOwner] == 1)
{
format(string,sizeof(string),"~w~Besitzer: ~g~%s~n~~y~ID: %d~n~~r~/hausinfo",HouseInfo[hid][Owner],HouseInfo[hid][ID]);
GameTextForPlayer(playerid,string,2500,3);
}
}
}
return 1;
}
So I don't really know how to do this or what is wrong with the code.
Anyway, thanks in advance