Strdel not work!
#1

Hi,

I do a script with strdel, the script delete the gang tag but don't work.

This is the script:

PHP код:
new nick[20];
format(nick,sizeof(nick),"%s",GetPlayerNameEx(playerid));
new 
lenght strlen(GetPlayerNameEx(playerid));
new 
lenght1 strlen(Gang[Info[playerid][aGang]]);
new 
lenght3 lenght-lenght1;
strdel(nicklenght3lenght);
SetPlayerName(playerid,nick); 
Thanks
Reply
#2

pawn Код:
new
    name[MAX_PLAYER_NAME],
    pos;

format(name, MAX_PLAYER_NAME, GetPlayerNameEx(playerid));

if ((pos = strfind(name, Gang[Info[playerid][aGang]])) != -1)
{
    strdel(name, pos, pos + strlen(Gang[Info[playerid][aGang]]));
}
SetPlayerName(playerid, name);
Reply
#3

Thanks! It's work!
rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)