name entered dm
#1

what would the code be for when you type a cmd it says


your name entered dildo dm

example


Код:
%S Entered Dildo DM!
and it sents it to everybody connected thank you:P
Reply
#2

Under OnPlayerConnect put:

pawn Код:
new string[128];
                new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid,playername,sizeof(playername));
        format(string,128,"%s Entered Dildo DM",playerid);
        SendClientMessage(playerid, COLOR, string);//Change COLOR to your Color Define
EDIT: String + Typo
Reply
#3

This code is better optimized and won't waste almost 100 character long string
in your servers memory. You can make It 18 characters longer without problems now,
but If you want a longer string just change the "+48" to a higher number.

pawn Код:
new str[MAX_PLAYER_NAME+48],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(str,sizeof(str),"%s has entered the Dildo DM area",pname);
SendClientMessageToAll(playerid,-1,str);
Reply
#4

Quote:
Originally Posted by YungGee
Посмотреть сообщение
Under OnPlayerConnect put:

pawn Код:
new string[128];
                new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid,playername,sizeof(playername));
        format(string,128,"%s Entered Dildo DM",playerid);
        SendClientMessage(playerid, COLOR, string);//Change COLOR to your Color Define
EDIT: String + Typo
it says m Entered Dildo DM


help plz
Reply
#5

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
This code is better optimized and won't waste almost 100 character long string
in your servers memory. You can make It 18 characters longer without problems now,
but If you want a longer string just change the "+48" to a higher number.

pawn Код:
new str[MAX_PLAYER_NAME+48],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(str,sizeof(str),"%s has entered the Dildo DM area",pname);
SendClientMessageToAll(playerid,-1,str);
Код:
new str[MAX_PLAYER_NAME+48],pname[MAX_PLAYER_NAME];
			GetPlayerName(playerid,pname,sizeof(pname));
			format(str,sizeof(str),"%s has entered the Dildo DM area",pname);
			SendClientMessageToAll(playerid,-1,str);
got these errors


Код:
C:\Users\Stephen-Laptop\Desktop\server samp - Copy\gamemodes\lvpg.pwn(1060) : error 035: argument type mismatch (argument 2)
C:\Users\Stephen-Laptop\Desktop\server samp - Copy\gamemodes\lvpg.pwn(1062) : error 017: undefined symbol "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

Lol that has nothing to do with my code, It doesn't even have "string" in it...
Reply
#7

dw fixed i had the code wrote down thanks tho
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)