05.08.2013, 23:53
is there a way to make..so if a player has sultan or/and elegy,infernus,bullet,jester at payday to give him -100k?
new carid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(carid) = 560) GivePlayerMoneyEx(playerid, -5000);
new carid = GetPlayerVehicleID(i);
new modelid = GetVehicleModel(i);
if(PlayerInfo[carid][pPcarkey] == IsAMasini(modelid) || PlayerInfo[carid][pPcarkey2] == IsAMasini(modelid) || PlayerInfo[carid][pPcarkey3] == IsAMasini(modelid))
{
GivePlayerCash(i, -100000);
SendClientMessage(i, COLOR_WHITE, " Asigurare Vehicule: -100000Lei");
}
forward IsAMasini(carid);
public IsAMasini(carid)
{
new modelid = GetVehicleModel(carid);
if(modelid == 451 || modelid == 560 || modelid == 541 || modelid == 495 || modelid == 559 || modelid == 561 || modelid == 562 || modelid == 565 || modelid == 579 || modelid == 429 || modelid == 506)
{
return 1;
}
return 0;
}
for(new i=0; i < MAX_VEHICLES; i++)
{
if(VInfo[i][Model] == DESIRED_MODEL_HERE)
{
if(!strcmp(VInfo[i][Owner],GetPlayerNameEx(playerid)))
{
//do stuff you want here
}
}
}