[FilterScript] What ?!, have Fun
#1

What that's?

This just for fun, if player say "What?" or "What ?" or "?"











And this object will be Remove after 3sec



pawn Код:
#include <a_samp>

#define What? 3

public OnPlayerText(playerid, text[])
{
    new idx;
    new tmp[128];
    tmp = strtok(text, idx);
    if((strcmp("What?", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("What?")))
    {
        SetPlayerAttachedObject(playerid, What?, 3215, 1, 0.8249, 0.0689, -0.0099, -11.4000, 89.3999, 0.7999, 1.0000, 1.0000, 1.0000, 0, 0); // "Man3rf" by Willam_Joe (Skin:291)
        SetTimerEx("RemoveWhat",3000,false,"i",playerid);
        return 0;
    }
    if((strcmp("What ?", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("What ?")))
    {
        SetPlayerAttachedObject(playerid, What?, 3215, 1, 0.8249, 0.0689, -0.0099, -11.4000, 89.3999, 0.7999, 1.0000, 1.0000, 1.0000, 0, 0); // "Man3rf" by Willam_Joe (Skin:291)
        SetTimerEx("RemoveWhat",3000,false,"i",playerid);
        return 0;
    }
    if((strcmp("?", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("?")))
    {
        SetPlayerAttachedObject(playerid, What?, 3215, 1, 0.8249, 0.0689, -0.0099, -11.4000, 89.3999, 0.7999, 1.0000, 1.0000, 1.0000, 0, 0); // "Man3rf" by Willam_Joe (Skin:291)
        SetTimerEx("RemoveWhat",3000,false,"i",playerid);
        return 0;
    }
    return 1;
}

forward RemoveWhat(playerid);
public RemoveWhat(playerid)
{
    RemovePlayerAttachedObject(playerid, What?);
    return;
}


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;
}
Reply
#2

lol nice work i bet i can make my players sacred with this haha
Reply
#3

Quote:
Originally Posted by Yves
Посмотреть сообщение
lol nice work i bet i can make my players sacred with this haha
Fun
Reply
#4

lol it 's funny thanks.
Reply
#5

Quote:
Originally Posted by M3HR4N
Посмотреть сообщение
lol it 's funny thanks.
Thx !

words arabic in your photo !

You are arabic ?!
Reply
#6

you could've used Strfind as it's easier.
Reply
#7

Quote:
Originally Posted by hossa
Посмотреть сообщение
you could've used Strfind as it's easier.
You can change it

i make this FS for 3min
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)