someproblem with the command
#1

I have this command:
pawn Код:
if(strcmp(cmd, "/savanna", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 5) return DenyMessage(playerid, 5);
        new pastname;
        pastname = GetPlayerName(playerid)
    SendClientMessage(playerid, COLOR_WHITE, "%s<--дсееъд аъ щок бдцмзд! щок дзгщ деа",pastname);
    SetPlayerName(playerid, Names[random(11)]);
        return 1;
    }
how can i do that if my name is bla and i did the command (/savanna) it will change my name to dgfdsfsafd
how can i do a command that returns the player name (from dgfdsfsafd to bla)
tanks for helpers
Reply
#2

check the " Names[random(11)]); " i think it is in that
Reply
#3

Quote:
Originally Posted by silvan
check the " Names[random(11)]); " i think it is in that
what??
explain more
Reply
#4

Umm yea 5th page+12 hours
please help me!!!!!!!!!!!!!!!!!!!1
Reply
#5

You have to use format to use '%s' as an escape code, then use SendClientMessage for the formatted string. You are using GetPlayerName incorrectly and the variable you created for it has to be indexed (one cell per character + 1)
Reply
#6

///// -------- DELETE POST -.-
Reply
#7

Quote:
Originally Posted by Joe Staff
You have to use format to use '%s' as an escape code, then use SendClientMessage for the formatted string. You are using GetPlayerName incorrectly and the variable you created for it has to be indexed (one cell per character + 1)
WTF Did you say?
just make me the code please
Reply
#8

http://forum.sa-mp.com/index.php?topic=114903.0
Reply
#9

I Just want to know how to set the dini file to:
%d X Y Z A

%d num of position
Reply
#10

check the callback of " SetPlayerName(playerid,Newname); "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)