18.05.2020, 08:17
(
Last edited by Adamoneoone; 18/05/2020 at 08:56 AM.
)
I don't exactly get what you're trying to achieve.
This part:
Won't do anything at all because:
• You create a string and send the player a message using that string, however you never format it or set its text if you will.
• The for loop is absolutely pointless, because in the end you never use the "i". Did you mean to write:
This part won't work either:
You're trying to ask sscanf to look for a valid playerid (the "u" specifier is wrong), and you are expecting to check if it's a string or not.
Should be:
And now, you don't need to redeclare a string.
I think you've got everything to get your code sorted.
This part:
Code:
new string[128]; for(new i = 0; i < MAX_PLAYERS; i ++) if(IsPlayerInVehicle(i, GetPlayerVehicleID(i))) SendClientMessage(playerid, COLOR_YELLOW, string);
• You create a string and send the player a message using that string, however you never format it or set its text if you will.
• The for loop is absolutely pointless, because in the end you never use the "i". Did you mean to write:
Code:
SendClientMessage(i, COLOR_YELLOW, string);
Code:
if (sscanf(params, "u", userid)) return SendSyntaxMessage(playerid, "/cw [text]");
Should be:
Code:
new string[128]; //or any size. if (sscanf(params, "s[128]", string)) return SendSyntaxMessage(playerid, "/cw [text]");
I think you've got everything to get your code sorted.