03.02.2011, 20:18
Quote:
hi everybody !
So i have a few problems/questions ... (1) Account system so i have a login/register system and everything work but in my server_log i have a warning from sscanf ... If someone register i get this: Код:
[21:22:23] sscanf warning: Strings without a length are deprecated, please add a destination size. Show us your sscanf line for the registration command __________________________________________________ ____________________________________________ (2) Send a message to the class MEDIC Ok, this is important to me ... I want to make a cmd for my other classes (Terrorist & Cops), i want to use the cmd '/help'. So if a cop or a terrorist type that and press enter, then must be a SendClientMessageToAll in the Medic class... Something like this !? pawn Код:
You see too that if someone type the cmd, then the 'helper' has to be founded on the map ! I don't have any idea to do that ! ...No clue what you mean there __________________________________________________ ___________________________________________ (3) SendClientMessageToAll only 1 class Yes here's the difficult part: pawn Код:
How to do this ?? :S use this function, it will need to be modified for your use. (BELOW) REMEMBER: I ONLY USE strcmp ! --------Can anyone solve this ?------ |
pawn Код:
stock CopMsg(string[])
{
Foreach(Player, i)// ******'s foreach. Better loops
{
if(gTeam[i] == POLICE)
{
SendClientMessage(i, WHITE, string);
}
}
return 1;
}
if(strcmp("/open", cmdtext,true) == 0)
{
if (gTeam[playerid] == POLICE)
{
new string[128], name[32];
MoveObject(gateCop1, -1572.0594482422, 665.98590087891, 6.1875, 3);
MoveObject(gateCop2, -1701.62109375, 702.8876953125, 23.890625, 3);
GetPlayerName(playerid, name, sizeof(name))
format(string, sizeof(string), "%s Has Opened The PD Gates!", name);
CopMsg(string);
}
}