SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/11/2014, 03:38 PM   #1
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,733
Reputation: 231
Default 1 object is removed.

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 Code:
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;

Glossy42O is offline   Reply With Quote
Old 28/11/2014, 03:42 PM   #2
Write
Banned
 
Join Date: Nov 2014
Posts: 263
Reputation: 149
Default Re: 1 object is removed.

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

pawn Code:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
Write is offline   Reply With Quote
Old 28/11/2014, 03:43 PM   #3
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,733
Reputation: 231
Default Re: 1 object is removed.

This is the code i gave, you just added i which will not do nothing. lol
Glossy42O is offline   Reply With Quote
Old 28/11/2014, 03:47 PM   #4
Write
Banned
 
Join Date: Nov 2014
Posts: 263
Reputation: 149
Default Re: 1 object is removed.

Quote:
Originally Posted by Stuun View Post
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.
Write is offline   Reply With Quote
Old 28/11/2014, 03:50 PM   #5
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,733
Reputation: 231
Default Re: 1 object is removed.

Quote:
Originally Posted by Turn View Post
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..
Glossy42O is offline   Reply With Quote
Old 28/11/2014, 03:51 PM   #6
Write
Banned
 
Join Date: Nov 2014
Posts: 263
Reputation: 149
Default Re: 1 object is removed.

Quote:
Originally Posted by Stuun View Post
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.
Write is offline   Reply With Quote
Old 28/11/2014, 03:53 PM   #7
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,733
Reputation: 231
Default Re: 1 object is removed.

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.
Glossy42O is offline   Reply With Quote
Old 28/11/2014, 04:04 PM   #8
Write
Banned
 
Join Date: Nov 2014
Posts: 263
Reputation: 149
Default Re: 1 object is removed.

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.
Write is offline   Reply With Quote
Old 28/11/2014, 04:11 PM   #9
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,733
Reputation: 231
Default Re: 1 object is removed.

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.
Glossy42O is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't find this object... Was it removed? Abagail General 5 10/04/2014 07:32 PM
Has object 18846 been removed? TheYoungCapone Everything and Nothing 11 27/12/2011 11:05 AM
[GameMode] [GM] Stunt Universe (Removed Stunts command removed) Oxside Gamemode Scripts 9 18/05/2010 04:01 AM
[Removed]Nees some help for object streamer. paultje162 Help Archive 1 19/06/2009 10:45 AM


All times are GMT. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.