17.06.2011, 07:58
Well, I wanted to make a script to where when you typed the command /rcar, it would bring your car that's reserved to you on the server to where you are, but I'm not having much luck. Any ideas?
CMD:bringcar(playerid, params[])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
for(new i; i <MAX_VEHICLES; i++);
{
if(strmatch(gVehicleData[i][E_OWNER], ReturnPlayerName(playerid))
{
SetVehiclePos(playerid, X+random(3), Y+random(3), Z+5);
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You dont have any cars!");
}
return 1;
}
stock strmatch(const String1[], const String2[])
{
if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) {
return true;
}
else {
return false;
}
}