Jump to content
  • 0

am si eu o problema cu un wanted


Question

Posted

am si eu o prob cu un mod gf un politist i da wanted la orice jicator il omoara cu arma si jucatoru trb sa intre in jail dar nu il baga in jail il da la respawn puteti sa imi ziceti ce are

3 answers to this question

Recommended Posts

Posted

Incearca asa"

if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/wanted", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "Scrie: (/su)spect [playerid/PartOfName] [crime text]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsACop(playerid))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        if(!IsACop(giveplayerid))
            			{
							GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							new length = strlen(cmdtext);
							while ((idx < length) && (cmdtext[idx] <= ' '))
							{
								idx++;
							}
							new offset = idx;
							new result[64];
							while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
							{
								result[idx - offset] = cmdtext[idx];
								idx++;
							}
							result[idx - offset] = EOS;
							if(!strlen(result))
							{
								SendClientMessage(playerid, COLOR_GREY, "Scrie: (/su)spect [playerid/PartOfName] [crime text]");
								return 1;
							}
							WantedPoints[giveplayerid] += 2;
							SetPlayerCriminal(giveplayerid,playerid, result);
							format(string, 256, "Wanted Bot: %s i-a dat lui %s Wanted pentru motivul %s",sendername, giveplayer, result);
							ABroadCast(COLOR_YELLOW,string,1);
							return 1;
						}
						else
						{
							SendClientMessage(playerid, COLOR_GRAD2, "You can't suspect a Cop !");
						}
					}
				}
				else
				{
						format(string, sizeof(string), "%d is not an active player.", giveplayerid);
						SendClientMessage(playerid, COLOR_GRAD1, string);
						return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "You are not a Police Departament,FBI or National Guard !");
			}
		}
		return 1;
	}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Posted

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GREY, "Scrie: (/su)spect [playerid/PartOfName] [crime text]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if (IsACop(playerid))

{

if(IsPlayerConnected(giveplayerid))

{

    if(giveplayerid != INVALID_PLAYER_ID)

    {

        if(!IsACop(giveplayerid))

            {

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[64];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GREY, "Scrie: (/su)spect [playerid/PartOfName] [crime text]");

return 1;

}

WantedPoints[giveplayerid] += 2;

SetPlayerCriminal(giveplayerid,playerid, result);

format(string, 256, "Wanted Bot: %s i-a dat lui %s Wanted pentru motivul %s",sendername, giveplayer, result);

ABroadCast(COLOR_YELLOW,string,1);

return 1;

}

else

{

SendClientMessage(playerid, COLOR_GRAD2, "You can't suspect a Cop !");

}

}

}

else

{

format(string, sizeof(string), "%d is not an active player.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD2, "You are not a Police Departament,FBI or National Guard !");

}

}

return 1;

}

am dat cum ai zis u si nu mi se compileaza

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.