17.04.2017, 19:21
Hello im making players colors but not worked.. how to i can fix it?
Here >> For /do + /pm i want fix it.
Here no bugs but When i type /do i got >> My Message ((And Here my name)) so i want fix it.... i want My Name (( Here Message ))
Here /pm i trying to fix it but still not work... im typing /pm 0 TesT i got random number [ID] Please help
Код:
stock SetPlayerWantedLevel(playerid, level) { switch(level) { case 0: SetPlayerColor(playerid, COLOR_WHITE); case 1: SetPlayerColor(playerid, COLOR_YELLOW); case 2: SetPlayerColor(playerid, COLOR_YELLOW); case 3: SetPlayerColor(playerid, COLOR_ORANGE); case 4: SetPlayerColor(playerid, COLOR_DARKORANGE); case 5: SetPlayerColor(playerid, COLOR_RED); case 6: SetPlayerColor(playerid, COLOR_RED); } return SetPlayerWantedLevel(playerid, level); }
Here no bugs but When i type /do i got >> My Message ((And Here my name)) so i want fix it.... i want My Name (( Here Message ))
Код:
CMD:do(playerid, params[]) { new text[128], str[128]; if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /do [text]"); format(str, sizeof(str), "* %s (( %s )) *", text, GetName(playerid)); SendClientMessageToAll(COLOR_ORANGE, str); return 1; }
Код:
CMD:pm(playerid, parmas[]) { new ID, Message[256], String[256], String2[256]; if(sscanf(parmas, "us[256]", ID, Message)) return SendClientMessage(playerid, COLOR_RED, "Usage: /pm [id] [message]"); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "Player not connected!"); if(ID == playerid) return SendClientMessage(playerid, COLOR_RED, "You can not PM yourself!"); if(PlayerInfo[ID][Block] == playerid) return SendClientMessage(playerid, COLOR_RED, "The player has chosen not recieve Pms from you!"); format(String, sizeof(String), "%s [%d] is no more accepting private messages!"); if(PlayerInfo[ID][PmOff] == 1) return SendClientMessage(playerid, COLOR_YELLOW, String); if(PlayerInfo[playerid][PmOff] == 1) return SendClientMessage(playerid, COLOR_RED,"You can not send private message when you have switched off your pms!"); format(String2, sizeof(String2), "[PM]: To %s(%d): %s", PlayerName(ID), Message); SendClientMessage(playerid, COLOR_YELLOW, String2); format(String2, sizeof(String2), "[PM]: From %s[%d]: %s", PlayerName(playerid), Message); SendClientMessage(ID, COLOR_YELLOW, String2); PlayerInfo[ID][Lastpm] = playerid; return 1; }