1 object is removed.
#1

Hello.


I'm having a little issue, I made anti spawn kill and i have added objects to the player like shield and a mask.

After spawn protection is over only the shield is being removed.

PHP код:
forward SP(playerid);
public 
SP(playerid)
{
  
SendClientMessage(playerid, -1"{00CC00}You are no longer spawn protected.");
  
SetPlayerHealth(playerid100);
  for(new 
i=0i<MAX_PLAYER_ATTACHED_OBJECTSi++)
  {
  if(
IsPlayerAttachedObjectSlotUsed(playeridplayerid)) RemovePlayerAttachedObject(playeridplayerid);
  }
  return 
1;

Reply
#2

You still haven't explained what you want to do, if you want to remove all attached objects on the player, use this.

pawn Код:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
Reply
#3

This is the code i gave, you just added i which will not do nothing. lol
Reply
#4

Quote:
Originally Posted by Stuun
Посмотреть сообщение
This is the code i gave, you just added i which will not do nothing. lol
You are placing "playerid, playerid" instead of "playerid, i" "i" is all the objects attached, if you don't know shit don't talk shit and I didn't even notice that you had it so don't go with that attitude.
Reply
#5

Quote:
Originally Posted by Turn
Посмотреть сообщение
You are placing "playerid, playerid" instead of "playerid, i" "i" is all the objects attached, if you don't know shit don't talk shit and I didn't even notice that you had it so don't go with that attitude.
Calm down jeez, You mad today?

EDIT: i get undefine symbol i..
Reply
#6

Quote:
Originally Posted by Stuun
Посмотреть сообщение
Calm down jeez, You mad today?
Nope, I just don't like people who replies stupid comments even thought they don't know what they're talking about.
Reply
#7

If you don't want to help then go away.

Plus my "stupid comment" why is it stupid? I need help instead of helping me you saying my comment is stupid? Damn, this is why i hate kids..


Fixed.
Reply
#8

I did help you and you replied with a stupid comment saying this "This is the code i gave, you just added i which will not do nothing. lol" and rofl are you seriously calling me a kid? check out your profile pal "Awesomeness: 10000"


Now, if you want to start an arguement feel free to pm me if not, stop bumping this thread because you're just making yourself look like a fool.
Reply
#9

Why do you keep replying ?

I said i fixed why do you reply?

Ahh kids.. and i have told you it will do nothing.


Starting to call me a fool and things.. Grow up.

Go read the forum rules.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)