17.04.2009, 11:18
Код:
#include <a_samp> new PlayerName[MAX_PLAYER_NAME]; // <<<< add this here remove the lower ones new Hery_Deizo; new Tomas_Slavinskas; public OnGameModeInit() { Hery_Deizo = AddStaticVehicle(422,-256.2316,1159.1613,19.4457,90.4772,1,1); Tomas_Slavinskas = AddStaticVehicle(580,-306.0162,1115.7000,19.6242,179.6534,1,1); return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if (vehicleid == Hery_Deizo) { //new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "Hery_Deizo", true) == 0) { SendClientMessage(playerid, 0xAA3333AA,"This car is yours"); } else { SendClientMessage(playerid, 0xAA3333AA, "This car's owner is Hery_Deizo !"); PutPlayerInVehicle(playerid, vehicleid, 1); } if (vehicleid == Tomas_Slavinskas) { //new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "Tomas_Slavinskas", true) == 0) { SendClientMessage(playerid, 0xAA3333AA,"This car is yours"); } else { SendClientMessage(playerid, 0xAA3333AA, "This car's owner is Tomas_Slavinskas !"); PutPlayerInVehicle(playerid, vehicleid, 1); } } return 1; }