SA-MP Forums Archive
name save - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: name save (/showthread.php?tid=420381)



name save - batuhanemir - 04.03.2013

hellooo my english is low. im sorry :/
there is a command as " /adminownerchange". when i register that command, the owner becomes who I want.
For example, when I register "/aownerchange Brad_Pitt", the owner becomes Brad Pitt. I can change the owner however
I want. But in this situation, Brad Pitt can't use the tool, because I can't change its "vehkey" valu.
could you help me about this?


Код:
	if(strcmp(cmd, "/aowner", true) == 0)
		 	{
				if(PlayerInfo[playerid][pAdmin] >= 5)
				{
			 	    new vehicleid = GetPlayerVehicleID(playerid);
				    if(IsPlayerConnected(playerid))
					{
						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_LIGHTRED,"/asahip [Araз sahip ismi]");
							return 1;
						}
						if(IsPlayerInAnyVehicle(playerid))
						{
						    if(strfind( result , "|" , true ) == -1)
						    {
								strmid(CarInfo[vehicleid][cOwner], result, 0, 64, 255);
								format(string, sizeof(string), "%d ID'li aracın sahibini %s olarak değiştirdiniz.",vehicleid, CarInfo[vehicleid][cOwner]);
								SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
								OnPropUpdate(4,vehicleid);
							}
							else
							{
								SendClientMessage(playerid, COLOR_LIGHTRED,"İzin Verilmeyen bir karakter girdiniz.");
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_LIGHTRED,"Herhangi bir aracın iзinde değilsiniz.");
						}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_LIGHTRED,"Kullanmak iзin yeterli yetkin yok");
				}
				return 1;
    }
		return 1;
	}



Re: name save - batuhanemir - 04.03.2013

please help me...


Re: name save - batuhanemir - 05.03.2013

please?


Re: name save - batuhanemir - 05.03.2013

please help me


Re: name save - batuhanemir - 06.03.2013

hey?