05.05.2013, 18:31
Whats bugged here?
Line 5543:
pawn Код:
CMD:pickup(playerid, params[])
{
if(sscanf(params, "s[10]", params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pickup [type]");
SendClientMessage(playerid, COLOR_GREY, "TYPES: Gun");
return 1;
}
if(!strcmp(params, "gun", true))
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
new f = MAX_OBJ+1;
for(new a = 0; a < MAX_OBJ; a++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, dGunData[a][ObjPos][0], dGunData[a][ObjPos][1], dGunData[a][ObjPos][2]))
{
f = a;
break;
}
}
if(f > MAX_OBJ) return SendClientMessage(playerid, COLOR_WHITE, "You are not near the weapon which you can pick up!");
DestroyObject(dGunData[f][ObjID]);
GivePlayerWeapon(playerid, dGunData[f][ObjData][0], dGunData[f][ObjData][1]);
dGunData[f][ObjPos][0] = 0.0;
dGunData[f][ObjPos][1] = 0.0;
dGunData[f][ObjPos][2] = 0.0;
dGunData[f][ObjID] = -1;
//dGunData[f][ObjData][0] = 0;
dGunData[f][ObjData][1] = 0;
new buffer[50];
format(buffer, sizeof(buffer), "You picked up %s.", GunNames[dGunData[f][ObjData][0]]);
SendClientMessage(playerid, COLOR_WHITE, buffer);
}
}
return 1;
}
Код:
BCRP.pwn(5543) : error 010: invalid function or declaration
pawn Код:
return 1;