All pastes #834664 Raw Edit

Miscellany

public cpp v1 · immutable
#834664 ·published 2007-12-28 11:14 UTC
rendered paste body
{    passenger[playerid] = ispassenger;    new streamid = GetVehicleStreamID(vehicleid);	SetVehicleUsed(vehicleid,true);    for(new d=0; d<3; d++) {  		if(GetVehicleModel(vehicleid) == pbike[d][0]) { 			speedo[playerid] = 2;       }	}	passenger[playerid] = ispassenger;	if(passenger[playerid] == 0) {	        if(PlayerInfo[playerid][logged] == 1) {	            new playername[256];			    GetPlayerName(playerid,playername,sizeof(playername));    	   		 if (strcmp(VehicleInfo[streamid][owner],playername,false) == 0) {					new string[256];					format(string, sizeof(string), "Welcome to your %s %s, please drive carefully!", VehicleInfo[streamid][name], PlayerInfo[playerid][name]);					SendClientMessage(playerid, COLOR_GREEN, string);					return 1;				}    	    	if (strcmp(VehicleInfo[streamid][owner],DEFAULT_OWNER,false) == 0) {               		 if(VehicleInfo[streamid][buybar] == 1) {                		new string[256];			        	format(string,sizeof(string),"This %s has been set as non-buyable by server administration!", VehicleInfo[streamid][name]);			        	SendClientMessage(playerid, COLOR_BRIGHTRED, string);			        	return 1;			    	}			    	new string[256];    	        	format(string, sizeof(string), "This %s is for sale and costs $%d, type /vmenu to see vehicle options.",VehicleInfo[streamid][name], VehicleInfo[streamid][vehiclecost]);    	        	SendClientMessage(playerid, COLOR_YELLOW, string);    	        	return 1;				}   				else {    	        	new string[256];    	        	format(string, sizeof(string), "This %s belongs to %s, and cannot be purchased.", VehicleInfo[streamid][name], VehicleInfo[streamid][owner]);    	        	SendClientMessage(playerid, COLOR_BRIGHTRED, string);    	        	return 1;				}			}			else {			    new playername[256];			    GetPlayerName(playerid,playername,sizeof(playername));			    if (strcmp(VehicleInfo[streamid][owner],playername,false) == 0) {					new string[256];					format(string, sizeof(string), "Welcome to your %s %s, please drive carefully! Remember, you must be logged in to acces vehicle controls.", VehicleInfo[streamid][name], playername);					SendClientMessage(playerid, COLOR_GREEN, string);					return 1;				}    	    	if (strcmp(VehicleInfo[streamid][owner],DEFAULT_OWNER,false) == 0) {               		 if(VehicleInfo[streamid][buybar] == 1) {                		new string[256];			        	format(string,sizeof(string),"This %s has been set as non-buyable by server administration!", VehicleInfo[streamid][name]);			        	SendClientMessage(playerid, COLOR_BRIGHTRED, string);			        	return 1;			    	}			    	new string[256];    	        	format(string, sizeof(string), "This %s is for sale and costs $%d, You must be logged in to purchase a vehicle.",VehicleInfo[streamid][name], VehicleInfo[streamid][vehiclecost]);    	        	SendClientMessage(playerid, COLOR_YELLOW, string);    	        	return 1;				}   				else {    	        	new string[256];    	        	format(string, sizeof(string), "This %s belongs to %s, and cannot be purchased.", VehicleInfo[streamid][name], VehicleInfo[streamid][owner]);    	        	SendClientMessage(playerid, COLOR_BRIGHTRED, string);    	        	return 1;				}			}    }	return 1;}