Help with Spikes
#1

Okay so I am working on this code where you put a spike and when you take it out it should say "You have removed the spike by:". But it won't show that, here is what I have.

The script:
http://pastebin.com/5gHb4MGe

The Include:
http://pastebin.com/g0DrqQBV
Reply
#2

BUMP
Reply
#3

BUMP to the top
Reply
#4

Bumpie Bump
Reply
#5

Why you dont use someones spike script?
Reply
#6

Quote:
Originally Posted by admigo
Посмотреть сообщение
Why you dont use someones spike script?
No I am saying that when I take the spikes out it should say who put it like "You have removed the spike by: The person who set the spikes."
Reply
#7

Quote:
Originally Posted by admigo
Посмотреть сообщение
Why you dont use someones spike script?
Because he want to have an original one
Reply
#8

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Because he want to have an original one
Can you help me getting that small part completed
Reply
#9

You bumped each 2 hours, I though the title "READ THIS BEFORE POSTING" in caps was big enough so people could read it.
But, whatever, it looks like reading posts is each time harder...
Let me help you...
Quote:

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.

https://sampforum.blast.hk/showthread.php?tid=45235.
Now, to your question...

pawn Код:
#include <a_samp>
    #include <SpikeStrip>

    strtok(const string[], &index)
    {
            new length = strlen(string);
            while ((index < length) && (string[index] <= ' '))
            {
                    index++;
            }

            new offset = index;
            new result[20];
            while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
            {
                    result[index - offset] = string[index];
                    index++;
            }
            result[index - offset] = EOS;
            return result;
    }
    //You can test it now xDD Ok :D
    public OnPlayerCommandText(playerid, cmdtext[])
    {
            new cmd[256];
            new idx;
            cmd = strtok(cmdtext, idx);

            if (strcmp(cmd,"/ms",true) == 0)
            {
                new name[MAX_PLAYER_NAME];
                new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
            GetPlayerPos(playerid, plocx, plocy, plocz);
            GetPlayerFacingAngle(playerid,ploca);
            GetPlayerName(playerid, name, sizeof(name));
            CreateStrip(name, plocx,plocy,plocz,ploca);
                return 1;
            }
            else if (strcmp(cmd,"/ds",true) == 0)
            {
                    DeleteClosestStrip(playerid);

                    for(new i = 0; i < sizeof(SpikeInfo); i++)
                    {
                        if(IsPlayerInRangeOfPoint(playerid, 2.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
                    {
                        new string[128];
                                    new pname[128];
                                    GetPlayerName(i, pname, sizeof(pname));
                                    format(string, sizeof(string), "You have removed the spike by: %s", pname);
                                    SendClientMessage(playerid, 0xFF0000FF, string);
                                    SpikeInfo[i][Name] = 0;
                            }
                    }
            }
            return 1;
    }
That should do it.
Reply
#10

Quote:
Originally Posted by Deskoft
Посмотреть сообщение
[I]You bumped each 2 hours, I though the title "READ THIS BEFORE POSTING" in caps was big enough so people could read it.
But, whatever, it looks like reading posts is each time harder...
Let me help you...

https://sampforum.blast.hk/showthread.php?tid=45235.
Hey genius, look at the date between his "BUMPITY BUMP" posts. That looks like about a week.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)